1.

Solve : c++ and ASCII?

Answer»

hi,

I need help with how to display the ASCII code for a character in c++. I'm new to the syntax of c++ and it's driving me mad. Also I need a PUSH in the right direction for writing a program that READS in a " " as a character. What sort of data type should I use. I'm not asking for the code for this program just a push in the right direction, I do want to figure most of it out myself. I guess that I'm stuck atm.

Thx main()

{
int c;
c=GETCH();
cout<<"\NTHE ascii code for the key you PRESSED "<
getch();
}

this code will show you the ascii code of the key that you've pressed

eg ascii code for a is 65;



mohammad miyan
amu
aligarh



Discussion

No Comment Found