Ok, I think I see what you mean. But run this:
Code:
#include <iostream.h>
#include <ctype.h>
int main()
{
char letter;
cout<<"Enter a letter : ";
cin>>letter;
letter=toupper(letter);
cout<< letter;
return 0;
}
I think what you want is this:
Code:
#include <iostream.h>
#include <conio.h>
#include <ctype.h>
int main()
{
char letter;
cout<<"Enter a letter : ";
letter = getch(); // The user doesn't have to press enter
letter=toupper(letter);
cout<< letter;
return 0;
}
Conio.h is not standard, so this may/maynot work, it does for me tho
Also, you can do this on a loop easily enough. Just make a string, and in a loop say StringName[i] += letter. You'll have to do something about backspaces I think, so the best way to do this is to read in a whole string at once, and then get a loop to 'toupper' it, if you get me.