Solved

clearing the input stack

Posted on 1997-06-07
1
192 Views
Last Modified: 2006-11-17
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
Comment
Question by:Amos060797
1 Comment
 
LVL 5

Accepted Solution

by:
julio011597 earned 30 total points
ID: 1251095
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question