xxxxxxxxxx
transform(str.begin(), str.end(), str.begin(), ::toupper);
xxxxxxxxxx
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s = "Viet Nam";
transform(s.begin(), s.end(), s.begin(), ::toupper); //uppercase
cout << s << endl;
return 0;
}
xxxxxxxxxx
char choice;
// it will instantly transform it to upper case without the need
// to convert it to int first
choice = (char)toupper(choice);