getch typeahead problem
Posted on 1998-07-22
Whenever I use the getch() or getche() functions and follow with scanf or gets(), the character
typed by the user at the getch()/ getche() prompt is 'echoed' at the gets()/scanf prompt. The only way to
avoid having the character picked up by these functions is to manually back over it. It happens
with both getch and getche so I know its not the echo feature of the getche function. I think it has
something to do with the fact that scanf/gets take arguments. Any help appreciated. Thanks.