#include<fstream.h>
void main()
{
char source[67],target[67];//max allowable path length usually 66
char ch;
cout<<"\n Enter souce filename=";
cin>>source;
cout<<"\n Enter target filename=";
cin>>target;
// create file for input
ifstream infile(source);
//create file for output
ofstream outfile(target);
//continue reading file until EOF is reached
while(infile)
{
infile.get(ch);
outfile.put(ch);
}
}
void main()
{
char source[67],target[67];//max allowable path length usually 66
char ch;
cout<<"\n Enter souce filename=";
cin>>source;
cout<<"\n Enter target filename=";
cin>>target;
// create file for input
ifstream infile(source);
//create file for output
ofstream outfile(target);
//continue reading file until EOF is reached
while(infile)
{
infile.get(ch);
outfile.put(ch);
}
}
No comments:
Post a Comment