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

Usage

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

Description

   The sgetc function returns the value of the character at the get pointer,
   without moving the get pointer.

   If the get pointer is already beyond the end of the get area, the
   underflow function will be called to attempt to replenish the get area.

   If this fails to do so, sgetc returns EOF.

Example 

   streambuf sb;
   int c;

   if ((c = sb.sgetc()) != EOF)
       cout << "Next char is ", << char(c);
   else
       cout << "No more chars in sb";

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