home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Actual 13
/
CDA13.ISO
/
cdactual
/
demobin
/
share
/
program
/
C
/
ANSICPP.ZIP
/
EX10019.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-07-24
|
280 b
|
17 lines
// ex10019.cpp
// The write member function
#include <fstream.h>
class Date {
int mo, da, yr;
public:
Date(int m, int d, int y) { mo = m; da = d; yr = y; }
};
main()
{
Date dt(6, 24, 40);
ofstream tfile("date.dat");
tfile.write((char *) &dt, sizeof dt);
}