|
|
#include <iostream.h>istream &read(char *buf, int num);
The read( ) function is a member of istream.
The read( ) function reads num bytes from the associated input stream and puts them in the buffer pointed to by buf (note that buf may also be of type unsigned char * or signed char *). If the end of the file is reached before num characters have been read, read( ) simply stops, and the buffer contains as many characters as were available. (See gcount( ).) read( ) returns a reference to the stream.
Related functions are gcount( ), get( ), getline( ), and write( ).
|
|