How could one convert a string to upper case. The examples I have found from googling only have to deal with chars.
The following works for me.
#include void toUpperCase(std::string& str) { std::transform(str.begin(), str.end(), str.begin(), ::toupper); } int main() { std::string str = "hello"; toUpperCase(&str); }