The error message is obvious, there is no such function.
It is said that there is no such function as toupper(string) in C++, and there is no such function as toupper(char *) in C. You can only use toupper(char) character by character.
toupper.cc: In function ‘int main()’:
toupper.cc:17: error: cannot convert ‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ to ‘int’ for argument ‘1’ to ‘int toupper(int)’
http://www.cplusplus.com/reference/cctype/toupper/
From this document, it seems that toupper should be the C function, but it accepts int, and the questioner passed string, so it is not match.
The error message is obvious, there is no such function.
It is said that there is no such function as toupper(string) in C++, and there is no such function as toupper(char *) in C. You can only use toupper(char) character by character.
The error I see here is
http://www.cplusplus.com/reference/cctype/toupper/
From this document, it seems that
toupper
should be theC
function, but it acceptsint
, and the questioner passedstring
, so it isnot match
.