http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx
C99 support added visual studio 2013, but I cant use complex.h in my
In case anyone is searching a year later, try
_Dcomplex dc1 = {3.0, 2.0};
for the variable declaration.
From looking inside VS2013's "complex.h" header, it seems that Microsoft decided on their own implementation for C complex numbers. You'll have to implement your own arithmetical operators using the real() and imag() functions, i.e.:
double real_part = real(dc1) + real(dc2);
double imag_part = imag(dc1) + imag(dc2);
_Dcomplex result = {real_part, imag_part};
Another way is to define like:
/*_Fcomplex */ _C_float_complex a = _FCbuild(5.0F, 1.0F);
printf( "z = %.1f% + .1fi\n", crealf(a), cimagf(a));
/*_Dcomplex*/ _C_double_complex b = _Cbuild(3.0, 2.0);
printf("z = %.1f% + .1fi\n",creal(b), cimag(b));