istream&
istream::get (streambuf&
sb [,
char delim])
Method
istream&
istream::getline (charptr,
int len [,char
delim])
Method
The remaining arguments limit how much to read: up to (but not including) the first occurrence in the input of a line delimiter character delim—newline (\n) by default, or up to len-1 characters (or to end of file, if that happens sooner). If getline succeeds in reading a ‘full line’, it also discards the trailing delimiter character from the input stream. (To preserve it as available input, see the similar form of istream::gets.)
If delim was not found before len characters or end of file, getline sets the ios::fail flag, as well as the ios::eof flag if appropriate.
getline writes a null character at the end of the string, regardless of which condition terminates the read.
istream&
istream::read (pointer,
int len)
Method
pointer may be of type char*, void*, unsigned char*, or signed char*.
If the istream ends before reading len bytes, read sets the ios::fail flag.
istream&
istream::gets (char
** s [,
char delim])
Method
To permit reading a string of arbitrary length, gets allocates whatever memory is required. Notice that the first argument, s, is an address to record a character pointer, rather than the pointer itself.
istream&
istream::scan (const
char *format ...)
Method
istream&
istream::vscan (const
char *format, va_list args)
Method