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