GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::basic_streambuf::sgetn,std::basic_streambuf::xsgetn(3) C++ Standard Libary std::basic_streambuf::sgetn,std::basic_streambuf::xsgetn(3)

std::basic_streambuf::sgetn,std::basic_streambuf::xsgetn - std::basic_streambuf::sgetn,std::basic_streambuf::xsgetn


std::streamsize sgetn( char_type* s, std::streamsize count ); (1)
protected: (2)
virtual std::streamsize xsgetn( char_type* s, std::streamsize count );


1) Calls xsgetn(s, count) of the most derived class.
2) Reads count characters from the input sequence and stores them into a character
array pointed to by s. The characters are read as if by repeated calls to sbumpc().
That is, if less than count characters are immediately available, the function calls
uflow() to provide more until Traits::eof() is returned.
Classes derived from std::basic_streambuf are permitted to provide more efficient
implementations of this function.


s - pointer to the beginning of a char_type array
count - maximum number of characters to read.


The number of characters successfully read. If it is less than count the input
sequence has reached the end.


The rule about "more efficient implementations" permits bulk I/O without
intermediate buffering: that's how std::ifstream::read simply passes the pointer to
the POSIX read() system call in some implementations of iostreams


This section is incomplete
Reason: no example


sputn invokes xsputn()
(public member function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.