input buffer

This is a discussion on input buffer within the C Programming forums, part of the General Programming Boards category; Does any one know of a reliable way to flush the input buffer from the keyboard apart from fflush(which dosen't ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    28

    input buffer

    Does any one know of a reliable way to flush the input buffer from the keyboard apart from fflush(which dosen't work all the time) Thanks for any suggestions you may have

  2. #2
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    while(getchar() != '\n') continue;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 02:20 PM
  2. Can't seem to come to conclusion : cin.ignore()
    By SkyHi in forum C++ Programming
    Replies: 8
    Last Post: 05-13-2005, 09:57 PM
  3. How can you tell if the input buffer is empty?
    By Punkture in forum C Programming
    Replies: 1
    Last Post: 06-04-2003, 06:10 PM
  4. text input buffer clearing
    By red_Marvin in forum C++ Programming
    Replies: 4
    Last Post: 03-20-2003, 03:17 PM
  5. Flushing the input buffer.
    By civix in forum C++ Programming
    Replies: 6
    Last Post: 08-19-2002, 07:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21