When i try typing the ascii character for Space, why does it come out different than whn i press space bar?
What is the real ascii for space and enter? thx in advance
When i try typing the ascii character for Space, why does it come out different than whn i press space bar?
What is the real ascii for space and enter? thx in advance
cout << "hit the space bar to find out the ASCII integer value for it " <<
char dummy;
cin >> dummy;
cout << "= " << (int)dummy << endl;
cout << "and hit the enter key to find out the ASCII integer value for it ";
cin >> dummy;
cout << "= " << (int)dummy;
thats KOOL!!!
too bad it doesnt work for enter and spacebar *laughs at you*
when you press enter, two characters are entered: carriage return (CR) and line feed (LF).
According to my ASCII table,
CR = 13
and
LF = 10
(those are decimal, not hex)
.
Again according to my ASCII table, try 32 for space. If that doesn't work, i would try 0 (zero). If that doesn't work, try ' '.