fixed-point types not supported in C++

double sqrtpi,rootpi;
int k =0;
for(int k=1;k<=1000;k++)
{
int a = 2k +1;
sqrtpi = 1/pow((2k +1),2);
}

This is my c++ program and it gives this error.
cpp:10: error: fixed-point types not supported in C++
My compiler is gcc compiler.
Thanks in advance for your help.



what does this mean?
int a = 2k +1;
also your local var is hidding global one! code has no efect

did u mean
int a = 2 * k + 1;
Topic archived. No new replies allowed.