![]() Then clear() can be used to reset the stream to a usable state. Gcount() can be used to count the number of characters has already read. If any error is occurred during reading in the file, the stream is placed in an error state, all future read operation will be failed then. It extracts a given number of bytes from the given stream and place them into the memory, pointed to by the first parameter. To read a binary file in C++ use read method. ![]() ![]() Syntax of write method ostream& write(const char*, int) Reading If any error has occurred during writing in the file, the stream is placed in an error state. If this pointer points into the middle of the file, characters in the file are overwritten with the new data. The file is extended if the put pointer is currently at the end of the file. It is used to write a given number of bytes on the given stream, starting at the position of the "put" pointer. To write a binary file in C++ use write method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |