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

Usage

   #include <iostream.hpp>
   int streambuf::sgetn(char *p, int n);

Description

   Attempts to take n characters starting with that at the current position

   of the get pointer, and putting them in the area of memory pointed at by
   p. The get pointer is left pointing at the position after the got
   pointers. If less than n characters are available, as many as possible
   are transferred. The return value , <= n, indicates how many were
   transferred.

Example 

   char buffer[128];
   streambuf sb;

   int howmany = sb.sgetn(buffer,20);

   if (howmany < 20)
       ...;    // end of file on sb

Return Value

   An int indicating how many characters were transferred.






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