Horje
c++ char to uppercase Code Example
convert all characters in string to uppercase c++
transform(str.begin(), str.end(), str.begin(), ::toupper); 
c++ char to uppercase
char choice; 
// it will instantly transform it to upper case without the need
// to convert it to int first
choice = (char)toupper(choice);
toupper c++
int result = toupper(charecterVariable);// return the int that corresponding upper case char
//if there is none then it will return the int for the original input.
//can convert int to char after
char result2 = (char)toupper(variableChar);
convert letters to uppercase in c++
#include <iostream>
#include <string>
using namespace std;

int main()
{
    char letter;

    cout << "You will be asked to enter a character.";
    cout << "\nIf it is a lowercase character, it will be converted to uppercase.";
    cout << "\n\nEnter a character. Press . to stop: ";

    cin >> letter;

    if(islower(letter))
    {
        letter = isupper(letter);
        cout << letter;
    }

    while(letter != '.')
    {
        cout << "\n\nEnter a character. Press . to stop: ";
        cin >> letter;

        if(islower(letter))
        {
            letter = toupper(letter);
            cout << letter;
        }
    }

    return 0;
}




Cpp

Related
easy c++ code Code Example easy c++ code Code Example
c++ program to reverse an array Code Example c++ program to reverse an array Code Example
c++ vector move element to front Code Example c++ vector move element to front Code Example
find in set of pairs using first value cpp Code Example find in set of pairs using first value cpp Code Example
c++ print to standard error Code Example c++ print to standard error Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11