记录详情

Compile Error

/in/foo.c: In function 'generate_pascal_triangle':
/in/foo.c:7:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for (int i = 1; i < n; i++) ;
     ^~~
/in/foo.c:8:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
         triangle[i][0] = 1;
         ^~~~~~~~
/in/foo.c:8:18: error: 'i' undeclared (first use in this function)
         triangle[i][0] = 1;
                  ^
/in/foo.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:4:9: warning: variable 'triangle' set but not used [-Wunused-but-set-variable]
     int triangle[n][n];
         ^~~~~~~~
/in/foo.c: At top level:
/in/foo.c:16:5: error: expected identifier or '(' before 'for'
     for (int i = 0; i < n; i++) {
     ^~~
/in/foo.c:16:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
     for (int i = 0; i < n; i++) {
                       ^
/in/foo.c:16:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
     for (int i = 0; i < n; i++) {
                             ^~
/in/foo.c:22:1: error: expected identifier or '(' before '}' token
 }
 ^

信息

递交者
类型
自测
语言
C
递交时间
2024-11-26 16:21:06
评测时间
2024-11-26 16:21:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes