Standard C++ Library Class Reference

Adds c to itself, then returns the result.
template <class X>
complex<T>
operator-= (const complex<X>& c);
Subtracts c from itself, then returns the result.
template <class X>
complex<T>
operator*= (const complex<X>& c);
Multiplies itelf by c then returns the result.
template <class X>
complex<T>
operator/= (const complex<X>& c);
Divides itself by c, then returns the result.
Member Functions
T
imag() const;
Returns the imaginary part of the complex number.
T
real() const;
Returns the real part of the complex number.
Non-member Operators
template<class T> complex<T>
operator+ (const complex<T>& lhs,const complex<T>& rhs);
template<class T> complex<T>
operator+ (const complex<T>& lhs, T rhs);
template<class T> complex<T>
operator+ (T lhs, const complex<T>& rhs);
Returns the sum of lhs and rhs.
template<class T> complex<T>
operator- (const complex<T>& lhs,const complex<T>& rhs);
template<class T> complex<T>
operator- (const complex<T>& lhs, T rhs);
template<class T> complex<T>
operator- (T lhs, const complex<T>& rhs);
Returns the difference of lhs and rhs.