السلام عليكم شباب ممكن مساعده في فهم هذ الكود
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
int main(int argc , char *argv[])
{
if(argc !=2)
cout<<"usage:copy file , infile to out file "<<endl;
else
{
ifstream inf(argv[1],ios::in);
if(! inf)
{
cout<<argv[1]<<"coud not be oppend "<<endl;
return (-1);
}
ofstream outf(argv[2],ios::app);
if(! outf)
{
{
cout<<argv[2]<<"coud not be oppened"<<endl;
return (-2);
}
char c=inf.get();
while(inf)
{
outf.put(c);
//outf1.put(c);
c=inf.get();
}
}
}
getch();
return 0;
}