1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
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 the following classes are discussed:
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 extract information from
memory rather than from file (comparable to bf(C)'s ti(sscanf) function).
)
|