complex Class
The template class describes an object that stores two objects of type Type, one that represents the real part of a complex number and one that represents the imaginary part.
template<class Type> class complex
An object of class Type:

Has a public default constructor, destructor, copy constructor, and assignment operator with conventional behavior.

Can be assigned integer or floatingpoint values, or type cast to such values with conventional behavior.

Defines the arithmetic operators and math functions, as needed, that are defined for the floatingpoint types with conventional behavior.
In particular, no subtle differences may exist between copy construction and default construction followed by assignment. None of the operations on objects of class Type may throw exceptions.
Explicit specializations of template class complex exist for the three floatingpoint types. In this implementation, a value of any other type Type is typecast to double for actual calculations, with the double result assigned back to the stored object of type Type.
Multiplies a target complex number by a factor, which may be complex or be the same type as are the real and imaginary parts of the complex number. 

Adds a number to a target complex number, where the number added may be complex or of the same type as are the real and imaginary parts of the complex number to which it is added. 

Subtracts a number from a target complex number, where the number subtracted may be complex or of the same type as are the real and imaginary parts of the complex number to which it is added. 

Divides a target complex number by a divisor, which may be complex or be the same type as are the real and imaginary parts of the complex number. 

Assigns a number to a target complex number, where the number assigned may be complex or of the same type as are the real and imaginary parts of the complex number to which it is being assigned. 