cppannotations/yo/iostreams/input.yo
2009-10-25 16:44:33 +00:00

17 lines
916 B
Text

In bf(C++) i(input) is primarily based on the hi(istream)tt(std::istream)
class. The tt(istream) class defines the basic operators and members
extracting information from streams: the emi(extraction operator) (rshift()),
and special members like tt(istream::read) reading unformatted
information from streams.
The class tt(istream) acts as em(base class) for several other classes, all
offering the functionality of the tt(istream) class, but adding their own
specialties. In the upcoming sections we will introduce:
itemization(
it() The class tt(istream), offering the basic facilities for doing input;
it() The class ti(ifstream), allowing us to read files
(comparable to bf(C)'s hi(fopen) tt(fopen(filename, "r")));
it() The class ti(istringstream), allowing us to read information from
text that is not stored on files (streams) but in memory (comparable to
bf(C)'s ti(sscanf) function).
)