记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:19: warning: statement with no effect [-Wunused-value]
  for(int i=2;i++;i<n+2)
                  ~^~~~
/in/foo.c:6:17: warning: unused variable 'd' [-Wunused-variable]
  int n,xi,yi,di,d=0;
                 ^
/in/foo.c: In function 'Search':
/in/foo.c:17:20: error: 'n' undeclared (first use in this function)
  for(int i=2;i++;i<n+2)
                    ^
/in/foo.c:17:20: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:19:4: error: 'd' undeclared (first use in this function)
    d+=di;
    ^
/in/foo.c:19:7: error: 'di' undeclared (first use in this function); did you mean 'i'?
    d+=di;
       ^~
       i
/in/foo.c:18:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  { if(xi==sv)
    ^~
/in/foo.c:20:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    xi=yi;
    ^~
/in/foo.c:20:7: error: 'yi' undeclared (first use in this function); did you mean 'i'?
    xi=yi;
       ^~
       i
/in/foo.c:21:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if(xi==ev) printf("%d",d);break;
     ^~
/in/foo.c:21:31: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if(xi==ev) printf("%d",d);break;
                               ^~~~~
/in/foo.c:22:4: error: 'else' without a previous 'if'
    else
    ^~~~

信息

递交者
类型
递交
题目
5 城市中的最短路径
比赛
小兰赛 2018/12/2
语言
C
递交时间
2018-12-02 10:18:22
评测时间
2018-12-02 10:18:22
评测机
分数
0
总耗时
14ms
峰值内存
2.914 MiB