I'm creating a game in the console and I want players to control their position in an array with the arrow keys. Using cin for this would require them to press enter each time they want to move.
What's the best / most effective method of getting unbuffered keyboard input? (without using cin)
looks like directinput is actually not the lowest level access for a keyboard.
Are you going to drag in the windows libraries in your program? If so the above looks like the best answer. If not, getch might do what you want, or an assembly one liner.
If you want unbuffered input from a file, you use the open system call (man 2 open). You can also use map, a more advanced syscall that allows you to directly access the kernel buffers used when reading a file, without bothering with read.