I've been trying to solve this problem for a while now with no luck. I want to monitor an input buffer(cin) for a keypress. The catch is, I don't want it to hang if the buffer is empty.
peek() won't work because one waits for a keypress and the other waits for the return key. Is there any way to check for a keypress, but move on if there was no keypress? I know there is a DOS interrupt available in assembly, but I don't know how to do it with C.
All 4 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.