ascii 10 in the stdin after fflush(stdin)??

This is a discussion on ascii 10 in the stdin after fflush(stdin)?? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi there - I just can't figure out what's going on??! lol I use _getch() to do non-echo input and ...

  1. #1
    Kev2
    Guest

    Cool ascii 10 in the stdin after fflush(stdin)??

    Hi there -

    I just can't figure out what's going on??! lol I use _getch() to do non-echo input and break the loop when I see a ascii 13. Later, I do a getchar() and it is finding a ascii 10 sitting around even after I do a fflush(stdin) right before the getchar(). What is going on here, please???

    Thanks,

    Kev

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    > fflush(stdin)
    This is undefined and you should not use it.
    This should tell you why: http://www.eskimo.com/~scs/C-faq/q12.26.html

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    Kev2
    Guest

    Cool

    Thanks Sean.

    Kev

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913

    Angry

    YOU STOLE MY NAME! I KILL YOU!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Edit txt
    By iBlood in forum C Programming
    Replies: 4
    Last Post: 04-28-2009, 03:38 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. ascii rpg help
    By aaron11193 in forum C Programming
    Replies: 18
    Last Post: 10-29-2006, 01:45 AM
  4. Heaps...
    By Nutshell in forum C Programming
    Replies: 14
    Last Post: 04-23-2002, 08:54 AM
  5. Formatting Output
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 03-26-2002, 12:33 AM

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