#include <fstream>
#include <conio.h>
#include <iostream>
int main()
{
int x,y;
ifstream f1("unu.in");
ifstream f2("doi.in");
ofstream f3("trei.out");
f1 >> x;
f2 >> y;
while (!f1.eof()&&!f2.eof())
{
if (x < y)
{
f3 << x << " ";
f1 >> x;
}
else
{
f3 << y << " ";
f2 >> y;
}
}
while (!f1.eof())
{
f3 << x << " ";
f2 >> y;
}
f1.close();
f2.close();
f3.close();
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13
Compiling source file(s)...
Prog4.cpp
Prog4.cpp: In function `int main()':
Prog4.cpp:8: error: `ifstream' undeclared (first use this function)
Prog4.cpp:8: error: (Each undeclared identifier is reported only once for each
function it appears in.)
Prog4.cpp:8: error: syntax error before `(' token
Prog4.cpp:10: error: `ofstream' undeclared (first use this function)
Prog4.cpp:11: error: `f1' undeclared (first use this function)
Prog4.cpp:12: error: `f2' undeclared (first use this function)
Prog4.cpp:17: error: `f3' undeclared (first use this function)
Prog4.exe - 7 error(s), 0 warning(s)