home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 May
/
Pcwk5b98.iso
/
Borland
/
Cplus45
/
BC45
/
STREAMS.PAK
/
STREAM3.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-29
|
626b
|
33 lines
// ---------------------------------------------------------------------------
// Copyright (C) 1994 Borland International
// stream3.cpp
// Must link with strmpnt.cpp
// ---------------------------------------------------------------------------
#include "strmpnt.h"
const char* FileName = "stream.dat";
void WriteStream()
{
ofpstream ofp(FileName);
T3DPoint p3(7,9,11);
ofp << &p3;
}
void ReadStream()
{
ifpstream ifp(FileName);
T3DPoint* p3 = 0;
ifp >> p3;
if( p3 )
p3->Draw();
}
int main()
{
WriteStream();
ReadStream();
return 0;
}