+ 1

C++ Game Controls

Hello, I want to make a game in ms dos. To move in the games, we usually use "wasd". However, when I write the code with using cin>>, the user write something and user must be press enter button. I don't want this. User will press 'd' and character will move to right. The computer should understand which letter on the keyboard you are pressed. That is, user shouldn't enter press button. How can I do that?

26th Jun 2017, 8:53 AM
Mustafa K.
Mustafa K. - avatar
1 Odpowiedź
+ 6
See either windows.h or ncurses
26th Jun 2017, 9:54 AM
jay
jay - avatar