Hello,
I need to use a complex type in order to see the result returned by std::polar.
I see that the CW10.2 contains <complex.h> with the next definition:
#define complex _Complex;
complex is not recognized like a type but _Complex apperas to be a type(the style it's the same as a int or void). Yet I get next error:
undefined identifier '_Complex' ;
What can I use for a complex number if that is not correct?
Have you tried to add C99 support on CW compiler options?
I think complex data type was integrated to C on C99 revision. For default, CW uses C without C99 , if you want C99 support you need to enable it on the compiler options.
Hi,
I met the same problem, How to set C99 support on the compiler options,
Hi,
First thank you for your answer.
Now I get the error
"complex types are not implemented"
I'm guessing that I can't use complex type alter all? Or what does this means?
Not sure which MCU device you're using, but here is my findings:
It seems the Freescale ARM compiler does not supported, need to double check that (got the same result as you).
I did the same test with GCC compiler within CW10.4 and it seems it supports it. Probably if your application allows it, you could move to GCC compiler using CW10,4?