Syntax:
#include <complex> template <class T> T imag( complex<T> num ); // or: T complex<T>::imag( );
The imag() function returns the imaginary part of num. It is available as both a regular function and as a method of the complex number.