I'm trying to get single keypress input without having to press enter after each key.
I can do it using conio.h but that isn't supported by the standard.
Which means in DevC++ it won't let me compile if I have
-Wall -Wstrict -prototypes -ansi -pedantic
turned on.
This is what I have
Anyone got a simple way to do it that will work with the ansi warnings and stuff turned on?Code:char key; key=getch(); switch(key) { case 'w': mover.move(0,-1); break; case 's': mover.move(0,1); break; case 'a': mover.move(-2,0); break; case 'd': mover.move(2,0); break; }



LinkBack URL
About LinkBacks



