Thecomplex library implements thecomplex class to contain complex numbers in cartesian form and several functions and overloads to operate with them. real() – It returns the real part of the complex number. imag() – It returns the imaginary part of thecomplex number.
yes c++ holds complex number.
In complex class variables to represent the real
and imaginary portions of a complex number.
Your Complex class should have at least the following member
functions publicly available:
Complex() Constructor: takes a real and an imaginary floating
point value. Both values should be defaulted to 0.0.
real() Returns the floating-point real number portion of the complex number.
imaginary() Returns the floating-point imaginary portion of the
thanks complex number.
for more info on operators on complex number :-