foo.cc:4:11: error: 'string' was not declared in this scope; did you mean 'std::string'?
4 | bool ifin(string a, char b) {
| ^~~~~~
| std::string
In file included from /nix/store/n19qjv3wanlki2nfwzr53mwc4qxk5vhn-gcc/include/c++/11.3.0/string:39,
from foo.cc:1:
/nix/store/n19qjv3wanlki2nfwzr53mwc4qxk5vhn-gcc/include/c++/11.3.0/bits/stringfwd.h:79:33: note: 'std::string' declared here
79 | typedef basic_string<char> string;
| ^~~~~~
foo.cc:4:21: error: expected primary-expression before 'char'
4 | bool ifin(string a, char b) {
| ^~~~
foo.cc:4:27: error: expression list treated as compound expression in initializer [-fpermissive]
4 | bool ifin(string a, char b) {
| ^
foo.cc:12:1: error: 'string' does not name a type; did you mean 'stdin'?
12 | string h[5];
| ^~~~~~
| stdin
foo.cc:13:8: error: 'string' was not declared in this scope; did you mean 'std::string'?
13 | bool r(string l) {
| ^~~~~~
| std::string
In file included from /nix/store/n19qjv3wanlki2nfwzr53mwc4qxk5vhn-gcc/include/c++/11.3.0/string:39,
from foo.cc:1:
/nix/store/n19qjv3wanlki2nfwzr53mwc4qxk5vhn-gcc/include/c++/11.3.0/bits/stringfwd.h:79:33: note: 'std::string' declared here
79 | typedef basic_string<char> string;
| ^~~~~~
foo.cc: In function 'int main()':
foo.cc:64:21: error: 'h' was not declared in this scope
64 | std::cin >> h[i];
| ^
foo.cc:68:14: error: 'r' cannot be used as a function
68 | if (r(l)) {
| ~^~~
[Hydro](https://hydro.ac)提供评测服务