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

Usage

   #include <iostream.hpp>
   int streambuf::sputbackc(char c);

Description

   In principle this function moves the get pointer back one character, and
   in the base class streambuf, this is all that happens. EOF is returned if
   sputbackc fails, as it will do for instance in class streambuf if the get
   pointer is at the beginning of the get area. Derived classes may actually
   be able to store the sputbackc argument character under these
   circumstances, but in general the behavior of sputbackc is not guaranteed
   unless the argument character was obtained from the streambuf by the
   immediately previous get operation.

Example 

   streambuf sb
   ...;

   int c = sb.sbumpc();
   sputbackc(c);
   c = sgetc();            // c has same value as sbumpc got

Return Value

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





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