Hello,

I'm trying to use getch several times in my program, but it is remembering earlier key presses.

Is there a function or command I can use to clear the getch buffer? Or am is there something else I am doing wrong?

Thank you.

C.

Recommended Answers

All 2 Replies

Edward isn't an expert on getch, but isn't the very definition of getch to read unbuffered input directly from the keyboard? Please post your code so that Ed can get a better idea of what you're trying to do.

thank you for your help, and had a silly mistake earlier which was the problem. Not getch.

Cheers.
C.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.