home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
C++-7
/
DISK4
/
SAMPLES
/
IOSTUTOR
/
EXIOS111.CP$
/
EXIOS111
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1991-11-25
|
254 b
|
12 lines
// exios111.cpp
// Binary example 1
#include <fstream.h>
#include <fcntl.h>
#include <io.h>
int iarray[2] = { 99, 10 };
void main()
{
ofstream ofs( "test.dat", ios::binary );
ofs.write( (char*)iarray, 4 ); // Exactly 4 bytes written
}