/ JoyAc /

记录详情

Compile Error

foo.cc:6:29: error: stray '\357' in program
 bool check(string a,string b,sting c)
                             ^
foo.cc:6:30: error: stray '\274' in program
 bool check(string a,string b,sting c)
                              ^
foo.cc:6:31: error: stray '\214' in program
 bool check(string a,string b,sting c)
                               ^
foo.cc:10:36: error: stray '\357' in program
    if((b[i]-a[i])+(c[i]-a[i])%26==0)
                                    ^
foo.cc:10:37: error: stray '\274' in program
    if((b[i]-a[i])+(c[i]-a[i])%26==0)
                                     ^
foo.cc:10:38: error: stray '\211' in program
    if((b[i]-a[i])+(c[i]-a[i])%26==0)
                                      ^
foo.cc:6:32: error: expected ',' or '...' before 'sting'
 bool check(string a,string b,sting c)
                                ^~~~~
foo.cc: In function 'bool check(std::__cxx11::string, std::__cxx11::string)':
foo.cc:10:7: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z
    if((b[i]-a[i])+(c[i]-a[i])%26==0)
       ^
foo.cc:10:20: error: 'c' was not declared in this scope
    if((b[i]-a[i])+(c[i]-a[i])%26==0)
                    ^
foo.cc:13:1: error: expected primary-expression before 'return'
 return  false;
 ^~~~~~
foo.cc:13:1: error: expected ')' before 'return'
foo.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
foo.cc: In function 'int main()':
foo.cc:26:26: error: too many arguments to function 'bool check(std::__cxx11::string, std::__cxx11::string)'
   if(check(s[1],s[2],s[3]))
                          ^
foo.cc:6:6: note: declared here
 bool check(string a,string b,sting c)
      ^~~~~
foo.cc:31:32: error: too many arguments to function 'bool check(std::__cxx11::string, std::__cxx11::string)'
    else if(check(s[2],s[1],s[3]))
                                ^
foo.cc:6:6: note: declared here
 bool check(string a,string b,sting c)
      ^~~~~
foo.cc:37:35: error: too many arguments to function 'bool check(std::__cxx11::string, std::__cxx11::string)'
       else if(check(s[3],s[1],s[2])){
                                   ^
foo.cc:6:6: note: declared here
 bool check(string a,string b,sting c)
      ^~~~~
foo.cc:19:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1012 字符串还原
语言
C++
递交时间
2021-11-22 19:29:39
评测时间
2021-11-22 19:29:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes