Hello, I need to do something when ctrl d is pressed and i dont know how to compare the ascii. for example:
Code:if(input == ctrl+d ){ // do this }
Hello, I need to do something when ctrl d is pressed and i dont know how to compare the ascii. for example:
Code:if(input == ctrl+d ){ // do this }
Check for EOF. See feof - C++ Reference for how to do so.
CTRL-D is ASCII code 0x04...
When you press CTRL you are resetting bit 6 of the standard ascii letter value.
Pressing SHIFT sets bit 5.
if (input = 4)...
Here's an ASCII chart for you to consult in future...
ASCII Codes - Table of ascii characters and symbols
Last edited by CommonTater; 11-07-2010 at 12:48 AM.
Thanks for the replies, I am good to go.
Now depending on which OS/Compiler you're using, one of the two previous answers will be wrong
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.