#include <iostream>streamsize readsome(char *buf, streamsize num);

The readsome( ) function is a member of istream.

The readsome( ) function reads num bytes from the associated input stream and puts them in the buffer pointed to by buf. If the stream contains less than num characters, that number of characters are read. readsome( ) returns the number of characters read. The difference between read( ) and readsome( ) is that readsome( ) does not set the failbit if there are less than num characters available.

Related functions are gcount( ), read( ), 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: