/ 程序猿 /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:9:19: error: expected ';' before '>=' token
     for(int i[n],n>=0,n<=100,n++);
                   ^~
/in/foo.cc:9:19: error: expected primary-expression before '>=' token
/in/foo.cc:9:33: error: expected ';' before ')' token
     for(int i[n],n>=0,n<=100,n++);
                                 ^
/in/foo.cc:9:13: warning: unused variable 'i' [-Wunused-variable]
     for(int i[n],n>=0,n<=100,n++);
             ^
/in/foo.cc:10:15: error: redeclaration of 'int n'
     for(int n,n=i[n]);
               ^
/in/foo.cc:10:13: note: 'int n' previously declared here
     for(int n,n=i[n]);
             ^
/in/foo.cc:10:21: error: expected ';' before ')' token
     for(int n,n=i[n]);
                     ^
/in/foo.cc:10:21: error: expected primary-expression before ')' token
/in/foo.cc:10:21: error: expected ';' before ')' token
/in/foo.cc:10:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int n,n=i[n]);
     ^~~
/in/foo.cc:11:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  printf("%d",n);
  ^~~~~~

信息

递交者
类型
递交
题目
数组逆序输出
语言
C++
递交时间
2018-10-28 16:55:57
评测时间
2018-10-28 16:55:57
评测机
分数
0
总耗时
17ms
峰值内存
3.543 MiB