I’m programming a console game, (pac-man), and I was wondering how I would get user input without them pressing the enter key. I looked around the internet a little and I found some stuff about _getch() but it is apparently no longer current and no header files are known to declare it unless one builds his own which I cannot do as I’m still really new to C++.
So how would I build a code that can do this?
Thanks
I’m programming a console game, (pac-man), and I was wondering how I would get
Share
This works for me (I am on linux):
It makes the console unbuffered.
reference: http://shtrom.ssji.net/skb/getc.html