Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by asdfsfafsf ( 7 years ago )
#include<iostream>
#include<fstream>

using namespace std;
int main()
{
     ifstream fin1, fin2;
     ofstream fout;
     char ch;
     
     fin1.open("file1.txt");
     fin2.open("file2.txt");

     fout.open("result.txt");

     while(fin1.eof()==0)
     {
        fin1>>ch;
        fout<<ch;
     }
     while(fin2.eof()==0)
     {
        fin2>>ch;
        fout<<ch;
     }
     cout<<"\n Two Files have been Merged Successfully \n";
     fin1.close();
     fin2.close();
     fout.close();
}

 

Revise this Paste

Your Name: Code Language: