Problems with cin and GetAsyncKeyState()

Hey guys!

I'm building a program for school, and it's supposed to have a menu. You must be able to navigate the menu using the arrow keys. I decided to use GetAsyncKeyState() to accomplish this. The menu works fine. However, when I try to use cin later on, it displays everything previously entered by the user. Is there a way to clear everything in cin?
*bump*
I don't think there is any
In C++ anyway

I know that in pascal you can change characters based on coordination in the windows.
I don't know how they do it but it can be done..

but why use cin?

Sorry If I am wrong I am a newbie here
I'm using cin because that's what my instructor said to do, and we're not allowed to submit things written in other languages so that Pascal thing won't help :P

But thanks anyways.
try cin.clear() and cin.ignore()
clear() will only clear cin's flags. I tried using ignore(), but it only ignores the next character in the buffer (I need it to ignore all of them) :(
Last edited on
Topic archived. No new replies allowed.