Problem hello
User vadar2525
Submission Time 2025-07-04 16:09:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hello.cpp: In function ‘int main()’:
hello.cpp:7:11: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
7 | if(mblen(s) <= 10)
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/9/bits/std_abs.h:38,
from /usr/include/c++/9/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from hello.cpp:1:
/usr/include/stdlib.h:922:31: note: initializing argument 1 of ‘int mblen(const char*, size_t)’
922 | extern int mblen (const char *__s, size_t __n) __THROW;
| ~~~~~~~~~~~~^~~