error: ‘for’ loop initial declarations are only allowed in C99 mode [duplicate]
问题 This question already has answers here : How to compile a C project in C99 mode? (4 answers) Closed 4 years ago . I am getting the below error, what is std=c99/std=gnu99 mode? source Code: #include <stdio.h> void funct(int[5]); int main() { int Arr[5]={1,2,3,4,5}; funct(Arr); for(int j=0;j<5;j++) printf("%d",Arr[j]); } void funct(int p[5]) { int i,j; for(i=6,j=0;i<11;i++,j++) p[j]=i; } Error Message: hello.c: In function ‘main’: hello.c:11:2: error: ‘for’ loop initial declarations are only