How do i print real and imaginary values in _Complex type variable ?
Thanks in advance
Regards
Printable View
How do i print real and imaginary values in _Complex type variable ?
Thanks in advance
Regards
nsh123,
Are you using std::complex<typename T> in your design?
If so, then there should be built in support for IOstream operations on the template class.
If you are extending std::complex<typename T> or if you are writing your own complex class, then it is customary to print out the results using a simple format in parentheses with a comma, like (r, i), for example (3.2, 4.3).
Sincerely, Chris.
:)
Thanks Chirs,
I solved the problem. Actually I was talking w.r.t C (sorry for not mentioning)
Regards
Mike.