Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<fstream>
- #include<string.h>
- using namespace std;
- int main(){
- ifstream elo1("1.txt");
- ifstream elo2("2.txt");
- ofstream wyjscie("3.txt");
- do {
- string linia;
- if(getline(elo1,linia )){
- wyjscie<<linia << " ";
- }
- if(getline(elo2,linia )){
- wyjscie<<linia;
- }
- wyjscie<<endl;
- }while(elo1 || elo2);
- wyjscie.close();
- elo1.close();
- elo2.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement