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>istream::sync</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
istream::sync

Usage

   #include <iostream.hpp>
   int istream::sync();

Description

   Attempts to make the external source of characters (the source that feeds

   the associated streambuf), consistent with the characters that have been
   extracted. This may effectively put characters which had been buffered
   back into their original source.

   This function is implemented as rdbuf()->sync(), it simply calls the sync
   function for the associated streambuf. EOF is returned if any error
   occurs.

Example 

   istream is(...);

   // Ultimate source  "abcdefghijklmnopqrstuvwxyz"
   // bold characters not yet read
   // streambuf contents   "opqr"
   // last character read was 'n'

   is.sync();

   // Ultimate source  "abcdefghijklmnopqrstuvwxyz"

   // bold characters not yet read
   // streambuf empty
   // last character read was 'n'

Return Value

   Returns EOF if an error occurs, otherwise some other int value.





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