This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: fflush(stdin)
- From: Jens Schweikhardt <schweikh at schweikhardt dot net>
- To: Kolpur Srinivasa Chary <srinu dot kolpur at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 29 Jan 2009 18:28:30 +0100
- Subject: Re: fflush(stdin)
- References: <1233188517.4064.5.camel@freedom>
On Thu, Jan 29, 2009 at 05:51:57AM +0530, Kolpur Srinivasa Chary wrote:
...
# But, fflush(stdin) was not as it should, it was not clearing buffer, so
# I was not able to read the character input from the user.
# So, is there any way to flush the buffer and read the character input
# from the user? Please help me out.
http://c-faq.com/stdio/stdinflush.html
and following.
Regards,
Jens
--
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)