foo.cc: In function 'int main()':
foo.cc:9:2: error: 'cin' was not declared in this scope
9 | cin >> str;
| ^~~
foo.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
4 | #include<sstream>
+++ |+#include <iostream>
5 | using namespace std;
foo.cc:10:15: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
10 | int l=strlen(str);
| ^~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from foo.cc:2:
/usr/include/string.h:385:35: note: initializing argument 1 of 'size_t strlen(const char*)'
385 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
[Hydro](https://hydro.ac)提供评测服务