Original Post
hi,
I have a problem. let me explain.
I start the program and a title comes up for around 5 seconds. Then i clear the screen and ask a question and use getline(cin, answer) to get the users guess to my question.
This works fine, however, during the title screen i can hit the keyboard and enter etc and when the question comes up it has all the keys i pressed during the title screen and also the enter key which means i have answered the question before i have even read it. How can i clear the keyboard buffer before using the getline command? so that even if u type something on the title screen, it won''t come up in the getline command???
I have tried cin.ignore but this seems to ignore it but i still see the keys i pressed etc. So this is no good.
thanks for your help.
Werdy 666