char choice;
// it will instantly transform it to upper case without the need
// to convert it to int first
choice = (char)toupper(choice);
transform(str.begin(), str.end(), str.begin(), ::toupper);
#include <iostream>
#include <string>
using namespace std;
int main()
{
char letter;
cout << "You will be asked to enter a character.";
cout << "
If it is a lowercase character, it will be converted to uppercase.";
cout << "
Enter a character. Press . to stop: ";
cin >> letter;
if(islower(letter))
{
letter = isupper(letter);
cout << letter;
}
while(letter != '.')
{
cout << "
Enter a character. Press . to stop: ";
cin >> letter;
if(islower(letter))
{
letter = toupper(letter);
cout << letter;
}
}
return 0;
}