记录详情

Compile Error

/in/foo.cc:15:1: error: 'string' does not name a type
 string SumStr(string C)
 ^~~~~~
/in/foo.cc:31:1: error: 'string' does not name a type
 string add(string A,string B)
 ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:64:5: error: 'string' was not declared in this scope
     string A,B;
     ^~~~~~
/in/foo.cc:65:3: error: 'cin' was not declared in this scope
   cin >> A >> B;
   ^~~
/in/foo.cc:65:10: error: 'A' was not declared in this scope
   cin >> A >> B;
          ^
/in/foo.cc:65:15: error: 'B' was not declared in this scope
   cin >> A >> B;
               ^
/in/foo.cc:66:10: error: expected ';' before 'S'
   string S=add(A,B);
          ^
/in/foo.cc:67:10: error: expected ';' before 'C'
   string C=S;
          ^
/in/foo.cc:68:3: error: 'C' was not declared in this scope
   C=SumStr(C);
   ^
/in/foo.cc:68:13: error: 'SumStr' was not declared in this scope
   C=SumStr(C);
             ^
/in/foo.cc:71:19: error: 'atoi' was not declared in this scope
   k=atoi(C.c_str())+1;
                   ^
/in/foo.cc:77:3: error: 'cout' was not declared in this scope
   cout<<k<<endl;
   ^~~~
/in/foo.cc:77:12: error: 'endl' was not declared in this scope
   cout<<k<<endl;
            ^~~~

信息

递交者
类型
自测
题目
P1511 Problem 2D. A+B,但是人生苦短...
语言
C++
递交时间
2023-10-19 14:17:11
评测时间
2023-10-19 14:17:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes