Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

clearing the input stack

I want to clear the scanf input stack after it abort an input line because of an error. how do I do that (using ANSI C only)?
0
Amos060797
Asked:
Amos060797
1 Solution
 
julio011597Commented:
Maybe just read and discard (i.e. forget the input).
There's no way to clear the input stream other than reading it.

-julio
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now