seekg and seekp


#include <iostream>istream &read(char *buf, streamsize 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. If the end of the file is reached before num characters have been read, read( ) simply stops, sets failbit, and the buffer contains as many characters as were available. (See gcount( ).) read( ) returns a reference to the stream.

Related functions are gcount( ), readsome( ), get( ), getline( ), and write( ).

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539 © 2008-2017.
If you may any questions please contact us: