Compile Error

foo.cc: In function 'int pd(int, int)':
foo.cc:5:15: error: 'a' was not declared in this scope
    5 |         int k=a;
      |               ^
foo.cc:6:14: error: 'b' was not declared in this scope
    6 |         if(a+b==k)      return 1;
      |              ^
foo.cc:7:12: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
    7 |         if((m==0 && n!=0) return 1;
      |            ^
foo.cc:7:26: error: expected ';' before 'return'
    7 |         if((m==0 && n!=0) return 1;
      |                          ^~~~~~~
      |                          ;
foo.cc:8:9: error: expected primary-expression before 'if'
    8 |         if(m%abs(n)==0 && n<0 ) return 1;
      |         ^~
foo.cc:7:36: error: expected ')' before 'if'
    7 |         if((m==0 && n!=0) return 1;
      |           ~                        ^
      |                                    )
    8 |         if(m%abs(n)==0 && n<0 ) return 1;
      |         ~~                          
foo.cc:11:12: error: expected primary-expression before ')' token
   11 |         if()
      |            ^
foo.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2245 A 阅读程序
语言
C++
递交时间
2022-08-21 22:01:14
评测时间
2022-08-21 22:01:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes