+7

Does c++ hold complex numbers...

c++

7/10/2019 7:31:39 AM

Muaaz Ahmed

5 Answers

New Answer

+5

gotta create a class and overload operators for that

+3

Yes it does, though not really directly. It has a library for that in the <complex> header. You can refer to http://www.cplusplus.com/reference/complex/

+3

Yes 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. Src= Google

+2

Not in a primitive built in data type.

+2

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 :- https://www.chegg.com/homework-help/questions-and-answers/c-programming-implement-class-called-complex-used-represent-complex-numbers-complex-number-q7925825