Connecting Tech Pros Worldwide Forums | Help | Site Map

C99 Complex number support in C++

kartik
Guest
 
Posts: n/a
#1: Jul 22 '05
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...


one2001boy@yahoo.com
Guest
 
Posts: n/a
#2: Jul 22 '05

re: C99 Complex number support in C++


kartik wrote:[color=blue]
> 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...
>[/color]

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...ard/c99.html#2

Pete Becker
Guest
 
Posts: n/a
#3: Jul 22 '05

re: C99 Complex number support in C++


"one2001boy@yahoo.com" wrote:[color=blue]
>
> 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.
>[/color]

"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.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
one2001boy@yahoo.com
Guest
 
Posts: n/a
#4: Jul 22 '05

re: C99 Complex number support in C++


Pete Becker wrote:[color=blue]
> "one2001boy@yahoo.com" wrote:
>[color=green]
>>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.
>>[/color]
>
>
> "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.
>[/color]


You are right. :(
Closed Thread