anybody can tell me how in c++ dos based to replace "enter key" to executing something with another key for example "a".
please reply me to febrian81@hotmail.com
regards
febrian
This is a discussion on key press in c++ within the C++ Programming forums, part of the General Programming Boards category; anybody can tell me how in c++ dos based to replace "enter key" to executing something with another key for ...
anybody can tell me how in c++ dos based to replace "enter key" to executing something with another key for example "a".
please reply me to febrian81@hotmail.com
regards
febrian
This isn't your own personal help board... NO one is going to email you. This board has a notify-by-email feature... USE it.
As for the question, do you mean input? Like, typing out a message and entering it in with the 'a' key?
That code would read a line of characters from the user; although instead of ending and returning with the enter key, the 'a' key now ends the input procedure.Code:char pszBuffer[256]; cin.getline(pszBuffer, 255, 'a');