|
|
1.1 ! root 1: // exios111.cpp ! 2: // Binary example 1 ! 3: #include <fstream.h> ! 4: #include <fcntl.h> ! 5: #include <io.h> ! 6: int iarray[2] = { 99, 10 }; ! 7: void main() ! 8: { ! 9: ofstream ofs( "test.dat", ios::binary ); ! 10: ofs.write( (char*)iarray, 4 ); // Exactly 4 bytes written ! 11: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.