tellg and tellp

stringstream, istringstream, and ostringstream

#include <sstream>explicit stringstream(ios::openmode mode = ios::in | ios::out);  explicit stringstream(const string &str,                       ios::openmode mode = ios::in | ios::out);  explicit istringstream(ios::openmode mode = ios::in); explicit istringstream(const string str, ios::openmode                         mode = ios::in); explicit ostringstream(ios::openmode mode=ios::out); explicit ostringstream(const string str, ios::openmode                         mode = ios::out);

The stringstream( ), istringstream( ), and ostringstream( ) functions are the constructors of the stringstream, istringstream, and ostringstream classes, respectively. These construct streams that are tied to strings.

The versions of stringstream( ), istringstream( ), and ostringstream( ) that specify only the openmode parameter create empty streams. The versions that take a string parameter initialize the string stream.

A related function is str( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net