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

Usage

   #include <iostream.hpp>
   int streambuf::snextc();

Description

   Moves the get pointer forward one, skipping the current character, and
   returning the character at the new position.

   If the get pointer is already beyond the end of the get area, or it is
   beyond the end when it has moved on one, the underflow function will be
   called to attempt to replenish the get area. If this fails to do so,
   snextc returns EOF.

Example 

   streambuf sb;
   ...;
   // stream is "abcdefg", get pointer on 'a'

   int c = sb.sgetc();
   cout << char(c);    // output 'a'
   c = sb.snextc();

   cout << char(c);    // output 'b'

   c = sb.sgetc();
   cout << char(c);    // output 'b'

Return Value

   An int that will be EOF if some error occurs, or there are no more
   characters to be had, or otherwise a positive int representing the
   character (treating the character as unsigned char).





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