home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
OTHERUTI
/
TCPP30-3.ZIP
/
EXAMPLES.ZIP
/
INTRO36.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-18
|
360b
|
19 lines
//INTO36.CPP--Example from Chapter 3, "An Introduction to C++"
#include <fstream.h>
int main()
{
char ch;
ifstream f1 ("OLDFILE.TXT");
ofstream f2 ("NEWFILE.TXT");
if (!f1) cerr << "Cannot open OLDFILE.TXT for input";
if (!f2) cerr << "Cannot open NEWFILE.TXT for output";
while (f2 && f1.get(ch))
f2.put(ch);
return 0;
}