/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:39:46: error: 'y2' was not declared in this scope
             scanf("%d %d %d %d",&x1,&y1,&x2,&y2);
                                              ^~
/in/foo.cc:41:6: warning: ISO C++ forbids incrementing a pointer of type 'double (*)(double) throw ()' [-Wpointer-arith]
    y1++;
      ^~
/in/foo.cc:41:6: error: lvalue required as increment operand
/in/foo.cc:44:61: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             printf("%d\n",sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1-1));
                                                             ^
/in/foo.cc:44:60: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
             printf("%d\n",sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1-1));
                                                          ~~^~
/in/foo.cc:19:12: note:   initializing argument 2 of 'int sum(int, int)'
 inline int sum(int x,int y)
            ^~~
/in/foo.cc:44:76: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             printf("%d\n",sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1-1));
                                                                            ^
/in/foo.cc:44:75: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
             printf("%d\n",sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1-1));
                                                                         ~~^~
/in/foo.cc:19:12: note:   initializing argument 2 of 'int sum(int, int)'
 inline int sum(int x,int y)
            ^~~
/in/foo.cc:38:23: warning: unused variable 'x3' [-Wunused-variable]
             int x1,x2,x3,x4;
                       ^~
/in/foo.cc:38:26: warning: unused variable 'x4' [-Wunused-variable]
             int x1,x2,x3,x4;
                          ^~
/in/foo.cc:53:20: error: 'x2' was not declared in this scope
             add(x1,x2,z);
                    ^~

信息

递交者
类型
递交
题目
P1512 SuperBrother打鼹鼠
语言
C++
递交时间
2019-07-30 16:31:02
评测时间
2019-07-30 16:31:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes