error: ‘for’ loop initial declarations are only allowed in C99 mode,
note: use option -std=c99 or -std=gnu99 to compile your code
The one of many reason for this error message is, May be you have written a code like
for(int i=0;i<=10;i++)
{
}
The error is due to the declaration of variable i in the for loop. You have to declare the variable outside the for loop i.e.
int i;
for(i=0;i<=10;i++)
{
}
And most probably your error message will not come. Try this.
For more detail you can visit http://gcc.gnu.org/c99status.html
0 comments:
Post a Comment