uppercase character in c++ code example
Example 1: convert all characters in string to uppercase c++
transform(str.begin(), str.end(), str.begin(), ::toupper);
Example 2: uppercase capitalise character in string c++
str[i] = toupper(str[i]);
transform(str.begin(), str.end(), str.begin(), ::toupper);
str[i] = toupper(str[i]);