foo.cc:6:1: error: ‘string’ does not name a type; did you mean ‘stdin’?
6 | string PalindromicString(string str){//目前还有BUG
| ^~~~~~
| stdin
foo.cc: In function ‘int main()’:
foo.cc:24:9: error: ‘string’ was not declared in this scope; did you mean ‘std::string’?
24 | string str,res;
| ^~~~~~
| std::string
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/iosfwd:41,
from /nix/gcc-13.2.0/include/c++/13.2.0/ios:40,
from /nix/gcc-13.2.0/include/c++/13.2.0/ostream:40,
from iostream:41:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stringfwd.h:77:33: note: ‘std::string’ declared here
77 | typedef basic_string<char> string;
| ^~~~~~
foo.cc:25:9: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
25 | cin>>str;
| ^~~
| std::cin
iostream:62:18: note: ‘std::cin’ declared here
foo.cc:25:14: error: ‘str’ was not declared in this scope; did you mean ‘std’?
25 | cin>>str;
| ^~~
| std
foo.cc:26:9: error: ‘res’ was not declared in this scope
26 | res=PalindromicString(str);
| ^~~
foo.cc:26:13: error: ‘PalindromicString’ was not declared in this scope
26 | res=PalindromicString(str);
| ^~~~~~~~~~~~~~~~~
foo.cc:27:9: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
27 | cout<<res<<endl;
| ^~~~
| std::cout
iostream:63:18: note: ‘std::cout’ declared here
foo.cc:27:20: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’?
27 | cout<<res<<endl;
| ^~~~
| std::endl
/nix/gcc-13.2.0/include/c++/13.2.0/ostream:735:5: note: ‘std::endl’ declared here
735 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~