Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>ostream::flush</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ostream::flush

Usage

   #include <iostream.hpp>
   ostream &ostream::flush();

Description

   The flush function calls the sync() function of the associated streambuf
   to ensure that all output is up to date, that is all characters that have
   been sent to the streambuf have been sent to their final destination, the
   external device to which the streambuf relates. Equivalent to
   rdbuf()->sync();.

Example 

   cout << "Enter a number between one and ten: ";
   cout.flush();   // this is actually extraneous because
                   // cin's tie to cout will do the same.

   int i;
   cin >> i;

Return Value

   The flush function returns a reference to the ostream object for which it

   was called.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson