i need to convert a line of text to all uppercase, but i am stuck, when i type in the line of text, it outputs only one word from that whole line.
ex:
Hello World!
output:
HELLO
i need that whole line to be uppercase or any line that i input. please help me. thank you.
Replace cin >> text; with cin.getline(text, 100);.
Also, you can just use std::toupper in <cctype>.
At the very least, you can use if (str[x] >= 'a' && str[x] <= 'z') instead of having to look up the ASCII values for those characters.