0_0_28904542_31606.cpp: In function 'int main()':
0_0_28904542_31606.cpp:16:39: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'size_t strnlen(const char*, size_t)'
for(int i = 0; i < strnlen(str); i++)
^
|