Quote originally posted by sfuo ...
Good to know. It works with MinGW in Code::Blocks.
Maybe so. But 3 years from now when you move to a new compiler and the code you've been using for the past 7 years suddenly doesn't work anymore, are you going to remember it might be because if fflush()? What's the chance your reaction will be "but it's always worked before!"
Stop using it now and get a jump on good habits.
I meant good to know not to use it.
When I was looking for something to clear the input stream I came across fflush() on http://www.cplusplus.com/reference/clibrary/cstdio/fflush/ and just tested it rather than reading what they had written about the function.