foo.cc: In function 'int main()':
foo.cc:7:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
7 | cout<<strlen(a)<<' '<<strlen(b);
| ^
| |
| char
In file included from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/cstring:42,
from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:48,
from foo.cc:1:
/nix/store/iczlqwdj10xiz3mmms6adnra0mn3ljk1-glibc-2.35-224-dev/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
foo.cc:7:34: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
7 | cout<<strlen(a)<<' '<<strlen(b);
| ^
| |
| char
In file included from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/cstring:42,
from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:48,
from foo.cc:1:
/nix/store/iczlqwdj10xiz3mmms6adnra0mn3ljk1-glibc-2.35-224-dev/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
[Hydro](https://hydro.ac)提供评测服务