Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2014 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0d37639a7816b41aba36 to your computer and use it in GitHub Desktop.
Save anonymous/0d37639a7816b41aba36 to your computer and use it in GitHub Desktop.
#include <windows.h>
#include <iostream>
#include <conio.h>
#include <fstream>
#include <locale.h>
#include <string>
using namespace std;
int main()
{
fstream p;
fstream a;
fstream n;
fstream r;
p.open("pol.txt",ios::in);
a.open("ang.txt",ios::in);
n.open("niem.txt",ios::in);
r.open("ros.txt",ios::in);
if(p.good(),a.good(),n.good(),r.good())
{
string tp, ta, tn, tr;
while(!p.eof(),!a.eof(),!n.eof(),!r.eof())
{
p>>tp;
a>>ta;
n>>tn;
r>>tr;
cout<<tp<<" "<<ta<<" "<<tn<<" "<<tr<<endl;
}
}
else cout<<"B³¹d plików!"<<endl;
getch();
return( 0 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment