记录详情

Compile Error

foo.c:15:1: error: unknown type name 'string'; did you mean 'stdin'?
   15 | string SumStr(string C)
      | ^~~~~~
      | stdin
foo.c:15:15: error: unknown type name 'string'; did you mean 'stdin'?
   15 | string SumStr(string C)
      |               ^~~~~~
      |               stdin
foo.c:31:1: error: unknown type name 'string'; did you mean 'stdin'?
   31 | string add(string A,string B)
      | ^~~~~~
      | stdin
foo.c:31:12: error: unknown type name 'string'; did you mean 'stdin'?
   31 | string add(string A,string B)
      |            ^~~~~~
      |            stdin
foo.c:31:21: error: unknown type name 'string'; did you mean 'stdin'?
   31 | string add(string A,string B)
      |                     ^~~~~~
      |                     stdin
foo.c: In function 'main':
foo.c:64:5: error: unknown type name 'string'; did you mean 'stdin'?
   64 |     string A,B;
      |     ^~~~~~
      |     stdin
foo.c:65:3: error: 'cin' undeclared (first use in this function)
   65 |   cin >> A >> B;
      |   ^~~
foo.c:65:3: note: each undeclared identifier is reported only once for each function it appears in
foo.c:66:3: error: unknown type name 'string'; did you mean 'stdin'?
   66 |   string S=add(A,B);
      |   ^~~~~~
      |   stdin
foo.c:66:12: warning: implicit declaration of function 'add' [-Wimplicit-function-declaration]
   66 |   string S=add(A,B);
      |            ^~~
foo.c:67:3: error: unknown type name 'string'; did you mean 'stdin'?
   67 |   string C=S;
      |   ^~~~~~
      |   stdin
foo.c:68:5: warning: implicit declaration of function 'SumStr' [-Wimplicit-function-declaration]
   68 |   C=SumStr(C);
      |     ^~~~~~
foo.c:71:5: warning: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   71 |   k=atoi(C.c_str())+1;
      |     ^~~~
foo.c:71:11: error: request for member 'c_str' in something not a structure or union
   71 |   k=atoi(C.c_str())+1;
      |           ^
foo.c:77:3: error: 'cout' undeclared (first use in this function)
   77 |   cout<<k<<endl;
      |   ^~~~
foo.c:77:12: error: 'endl' undeclared (first use in this function)
   77 |   cout<<k<<endl;
      |            ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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