C99 Complex number support in C++

K

kartik

Can someone tell me how can i use the C99 Complex types( _Complex,
_Imaginary etc) in C++?
C++ has its own complex STL that is different from C99 complex types.

Any pointers will be helpful.

Thanks...
 
O

one2001boy

kartik said:
Can someone tell me how can i use the C99 Complex types( _Complex,
_Imaginary etc) in C++?
C++ has its own complex STL that is different from C99 complex types.

Any pointers will be helpful.

Thanks...

C99 complex is a keyword in C, I don't think C++ standard support it for
now, but it might be supported in the future.

C/C++ interpreter Ch supports both C99 complex and C++ complex class.
You can take a look below a link below and see if it helps, ch is also
free to use.

http://www.softintegration.com/demos/chstandard/c99.html#2
 
P

Pete Becker

C99 complex is a keyword in C, I don't think C++ standard support it for
now, but it might be supported in the future.

"complex" is not a keyword in C99. "_Complex" is a keyword, and the
header <complex.h> defines a macro "complex" that expands to "_Complex".
If you don't use that header, "complex" has no special meaning.
 
O

one2001boy

Pete said:
"complex" is not a keyword in C99. "_Complex" is a keyword, and the
header <complex.h> defines a macro "complex" that expands to "_Complex".
If you don't use that header, "complex" has no special meaning.


You are right. :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top