Namespaces
Variants
Views
Actions

std::complex::operator=

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 20:17, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
complex<T>& operator=( const T& x );
(1)
complex<T>& operator=( const complex<T>& cx );
(2)

Assigns new values to the contents.

1) Assigns x to the real part of the complex number. Imaginary part is set to zero.
2) Assigns cx.real() and cx.imag() to the real and the imaginary parts of the complex number respectively.

[edit] Parameters

x - value to assign
cx - complex value to assign

[edit] Return value

*this