There isn't a member function in the string class called 'toupper'. The string is supposed to be an argument to the function, but it's only mean't for one character.
int toupper ( int c );
Lowercase letter character to be converted, casted to an int, or EOF.
That's because the function returns an integer, or the ASCII value of that character. You'll have to cast it as a char if you want it to work correctly.
1 2 3 4 5 6 7
int main(void) {
std::string str = "Hello";
for(int i = 0; i < str.size(); ++i)
std::cout << static_cast<char>(toupper(str[i]));
// std::cout << (char)toupper(str[i]);
return 0;
}