记录详情

Compile Error

/in/foo.cc:5:6: error: variable or field 'AtoB' declared void
    5 | void AtoB(string s) {
      |      ^~~~
/in/foo.cc:5:11: error: 'string' was not declared in this scope
    5 | void AtoB(string s) {
      |           ^~~~~~
/in/foo.cc:4:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
    3 | #include <stack>
  +++ |+#include <string>
    4 | using namespace std;
/in/foo.cc:28:6: error: variable or field 'BtoA' declared void
   28 | void BtoA(string s) {
      |      ^~~~
/in/foo.cc:28:11: error: 'string' was not declared in this scope
   28 | void BtoA(string s) {
      |           ^~~~~~
/in/foo.cc:28:11: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
/in/foo.cc: In function 'int main()':
/in/foo.cc:32:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
   32 |     int T; scanf("%d", T);
      |                   ~^   ~
      |                    |   |
      |                    |   int
      |                    int*
/in/foo.cc:34:9: error: 'string' was not declared in this scope
   34 |         string s;
      |         ^~~~~~
/in/foo.cc:34:9: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
/in/foo.cc:35:13: error: 's' was not declared in this scope
   35 |         if (s[0] == 'R') AtoB(s);
      |             ^
/in/foo.cc:35:26: error: 'AtoB' was not declared in this scope
   35 |         if (s[0] == 'R') AtoB(s);
      |                          ^~~~
/in/foo.cc:36:14: error: 'BtoA' was not declared in this scope
   36 |         else BtoA(s);
      |              ^~~~

信息

递交者
类型
递交
题目
P1001 Hello, World!
语言
C++
递交时间
2025-07-14 13:55:04
评测时间
2025-07-14 13:55:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes