In addition to using the >> and << operators a variety of other member
functions
are available in the istream and ostream classes. They
are
referred to as unformatted stream functions because they do not
skip
whitespaces, newlines etc. The following is only a small subset
of
member functions. For a comprehensive list of all member
functions of the istream and ostream classes, refer to
your
text book or C++ reference manual
istream& get(char& c);
// reads one character, without ignoring whitespace
// terminates when '\n' is encountered
int get(); // Extracts a character and returns it. Returns EOF if
end of
// file (^d) is encountered
istream& get(char* ptr , int len, char delim='\n');
// Extracts characters until delim is found or
// len-1 number of characters have been extracted
// Leaves delim in the stream
istream& getline(char* ptr , int len, char delim='\n');
// Extracts characters until delim is found or
// len-1 number of characters have been extracted
// Extracts delim from the stream but does not put in ptr
istream& ignore(int num=1 , char delim=EOF);
// Extracts and discards characters until delim
// is read or num characters have been extracted
istream& eof(); // returns TRUE (a non-negative integer) if stream has
ended