/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);
| ^~~~