C++ Game Controls | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 6
See either windows.h or ncurses
26th Jun 2017, 9:54 AM
jay
jay - avatar