#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char * argv[])
{
if(argc < 3)
{
cout<< "Please pass 2 file names"<<endl;
return 0;
}
else
{
string line;
fstream ifile, ofile;
ifile.open(argv[1], ios::in);
ofile.open(argv[2], ios::out);
while(getline(ifile, line))
{
ofile << line << endl ;
}
return 1;
}
}
#include <fstream>
using namespace std;
int main(int argc, char * argv[])
{
if(argc < 3)
{
cout<< "Please pass 2 file names"<<endl;
return 0;
}
else
{
string line;
fstream ifile, ofile;
ifile.open(argv[1], ios::in);
ofile.open(argv[2], ios::out);
while(getline(ifile, line))
{
ofile << line << endl ;
}
return 1;
}
}
No comments:
Post a Comment