std::strtoimax

Defined in header <cinttypes> std::intmax_t strtoimax( const char* nptr, char** endptr, int base ); (since C++11) std::uintmax_t strtoumax( const char* nptr, char** endptr, int base ); (since C++11) Interprets an integer value in a byte string pointed to by nptr. Discards any whitespace characters (as identified by calling isspace()) until the first non-whitespace character is found, then takes as many characters as possible to form a valid base-n (where n=base) integ

std::strtof

Defined in header <cstdlib> float strtof( const char* str, char** str_end ); (since C++11) double strtod( const char* str, char** str_end ); long double strtold( const char* str, char** str_end ); (since C++11) Interprets a floating point value in a byte string pointed to by str. Function discards any whitespace characters (as determined by std::isspace()) until first non-whitespace character is found. Then it takes as many characters as possible to f

std::strstreambuf::underflow

protected: virtual streambuf<char>* setbuf(char* s, std::streamsize n); If s is a null pointer and n is zero, this function has no effect. Otherwise, the effect is implementation-defined: some implementations do nothing, while some implementations deallocate the dynamic member array used as the buffer and begin using the user-supplied character array of size n, whose first element is pointed to by s. This function is protected virtual, it may only be called through pubsetbuf() or

std::strstreambuf::underflow

protected: virtual int_type underflow(); Reads the next character from the get area of the buffer. If the input sequence has a read position available (gptr() < egptr(), returns (unsigned char)(*gptr()). Otherwise, if pptr() is not null and pptr() > egptr() (there is a put area and it is located after the get area), extends the end of the get area to include the characters that were recently written into the put area by incrementing egptr() to some value between gptr() and pptr(),

std::strstreambuf::strstreambuf

explicit strstreambuf( std::streamsize alsize = 0 ); (1) strstreambuf( void* (*palloc)(std::size_t), void (*pfree)(void*) ); (2) strstreambuf( char* gnext, std::streamsize n, char* pbeg = 0 ); (3) strstreambuf( signed char* gnext, std::streamsize n, signed char* pbeg = 0 ); (4) strstreambuf( unsigned char* gnext, std::streamsize n, unsigned char* pbeg = 0 ); (5) strstreambuf( const char* gnext, std::streamsize n ); (6) strstreambuf( const signed char* gnext,

std::strstreambuf::str

char* str() const; Calls freeze(), then returns a copy of start pointer of the get area, std::streambuf::eback(). The start of the get area, for all writeable std::strstreambuf objects constructed through the interface provided by std::strstream, is also the start of the put area. Parameters (none). Return value A copy of eback(), which may be a null pointer. Notes This function is typically called through the std::strstream interface. The call to freeze() guarantees that the r

std::strstreambuf::seekpos

protected: virtual pos_type seekpos(pos_type sp, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out ); Repositions std::basic_streambuf::gptr and/or std::basic_streambuf::pptr, if possible, to the position indicated by sp. If std::ios_base::in is set in which, attempts to reposition gptr() (the next pointer in the get area). If std::ios_base::out is set in which, attempts to reposition pptr() (the next pointer in the put area). If neither bit

std::strstreambuf::seekoff

protected: virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out); Repositions std::basic_streambuf::gptr and/or std::basic_streambuf::pptr, if possible, to the position that corresponds to exactly off characters from beginning, end, or current position of the get and/or put area of the buffer. If which includes ios_base::in and this buffer is open for reading, then reposit

std::strstreambuf::pcount

int pcount() const; Returns the number of characters written to the output sequence. If the next pointer for the put area (std::streambuf::pptr()) is a null pointer, returns zero. Otherwise, returns the next pointer in the put area minus the beginning pointer in the put area, that is pptr() - pbase(). Parameters (none). Return value The number of characters written to the put area. Example #include <strstream> #include <iostream> int main() { std::strstream

std::strstreambuf::pbackfail

protected: virtual int_type pbackfail( int_type c = EOF ); This protected virtual function is called by the public functions basic_streambuf::sungetc and basic_streambuf::sputbackc (which, in turn, are called by basic_istream::unget and basic_istream::putback). 1) The caller is requesting that the get area is backed up by one character (pbackfail() is called with no arguments or with EOF as the argument) a) First, checks if there is a putback position, and if there really isn't, fails