Annotation of mstools/samples/iostutor/exios113.cpp, revision 1.1.1.1

1.1       root        1: // exios113.cpp
                      2: // Binary example 3
                      3: #include <fstream.h>
                      4: #include <fcntl.h>
                      5: #include <io.h>
                      6: int iarray[2] = { 99, 10 };
                      7: void main()
                      8: {
                      9:     filedesc fd = _open( "test.dat", _O_BINARY | _O_CREAT | _O_WRONLY 
                     10: );
                     11:     ofstream ofs( fd );
                     12:     ofs.write( (char*)iarray, 4 ); // Exactly 4 bytes written
                     13: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.