# std::complex::operator+=,-=,*=,/=

< cpp‎ | numeric‎ | complex

C++
 Language Standard library headers Concepts Utilities library Strings library Containers library Algorithms library Iterators library Numerics library Input/output library Localizations library Regular expressions library (C++11) Atomic operations library (C++11) Thread support library (C++11)

Numerics library
 Common mathematical functions Floating-point environment Complex numbers Numeric arrays Pseudo-random number generation Compile-time rational arithmetic (C++11) Generic numeric operations iota (C++11) accumulate inner_product adjacent_difference partial_sum

std::complex
Member functions
complex::operator+=complex::operator-=complex::operator*=complex::operator/=
Non-member functions
 real imag abs arg norm conj proj (C++11) polar operator""ioperator""ifoperator""il (C++14)(C++14)(C++14)
Exponential functions
Power functions
Trigonometric functions
 asin (C++11) acos (C++11) atan (C++11)
Hyperbolic functions
 asinh (C++11) acosh (C++11) atanh (C++11)

 complex& operator+=( const T& other ); (1) complex& operator+=( const complex& other ); (2) complex& operator-=( const T& other ); (3) complex& operator-=( const complex& other ); (4) complex& operator*=( const T& other ); (5) complex& operator*=( const complex& other ); (6) complex& operator/=( const T& other ); (7) complex& operator/=( const complex& other ); (8)

Implements the compound assignment operators for complex arithmetic and for mixed complex/scalar arithmetic. Scalar arguments are treated as complex numbers with the real part equal to the argument and the imaginary part set to zero.

1-2) Adds `other` to *this.
3-4) Subtracts `other` from *this.
5-6) Multiplies *this by `other`.
7-8) Divides *this by `other`.

### Parameters

 other - a complex or scalar value of matching type (float, double, long double)

*this