Problem goodprogrammer
User cobnet
Submission Time 2024-02-21 17:09:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

goodprogrammer.cpp: In function ‘int main()’:
goodprogrammer.cpp:3:39: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
3 | int main(){string n; cin >> n; printf(n);}
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/c++/9/ext/string_conversions.h:43,
from /usr/include/c++/9/bits/basic_string.h:6496,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,