PDA

View Full Version : ascii 10 in the stdin after fflush(stdin)??



Kev2
05-28-2002, 07:54 PM
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

sean345
05-28-2002, 11:07 PM
> 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

Kev2
06-02-2002, 11:43 AM
Thanks Sean.

Kev

sean
06-03-2002, 03:53 PM
YOU STOLE MY NAME! I KILL YOU!