Witam.
Przerabiam pewien tekst z angielskiej książki do C++ i mam problem ze zrozumieniem poniższego fragmentu, a muszę to przetłumaczyć na polski. Ogólnie fragment jest o plikach binarnych i funkcjach write i read.
Writing Bytes with ostream Member Function write
When writing an integer number to a file, instead of using the statementoutFile << number;
which for a four-byte integer could print as few digits as one or as many as 11 (10 digits plus a sign, each requiring a single byte of storage), we can use the statement
outFile.write( reinterpret_cast< const char * >( &number ),
sizeof( number ) );which always writes the binary version of the integer's four bytes (on a machine with fourbyte integers).
Proszę o pomoc.