Name

operator>> function template — Reads a complex number

Synopsis

template<typename T, typename charT, typename traits>
  basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&,
                                           complex<T>& z);

The >> operator reads a complex number from an input stream into z. The input format can be any of the following:

x

The value x is the real part, and T( ) or 0 is the imaginary part.

(x)

The value x is the real part, and T( ) or 0 is the imaginary part.

(x, y)

The value x is the real part, and y is the imaginary part.