Does c++ hold complex numbers...


7/10/2019 7:31:39 AM

Muaaz Ahmed

5 Answers

New Answer


gotta create a class and overload operators for that


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/


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


Not in a primitive built in data type.


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