I'm program on a game which need to move something, I learnt that getch() function can solve a moving problem, it works!\
But the problem comes too, when I accidentally press two key at the same time, the program keep reading that keyword and ignore my following input...
I wanna know how to solve such a problem , thanks!
The console stream was not designed for this kind of input. What you should be using is something like "GetAsyncKeyState()" from the WinAPI: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx and running it against all of the meaningful keys in you input loop. Even that isn't ideal though, it's just good enough for most cases. There is a reason that there are so many libraries designed specifically for making games.