#include<iostream.h>
#include<conio.h>

#include<fstream.h>

#include<stdlib.h>
int main(int argc,char *argv[])
{
int number[9]={11,22,33,44,55,66,77,88,99};
if(argc!=3)
{
cout<<"argc = "<<argc<<"\n";
cout<<"error in args\n";

}

ofstream fout1,fout2;
fout1.open(argv[1]);
if (fout1.fail())
{
cout<<"could t open file";

}

fout2.open(argv[2]);
if (fout2.fail())
{
cout<<"could nt open file";

}

for(int i=0;i<9;i++)
{
if(number[i]%2==0)
fout2<<number[i]<<" ";
else
fout2<<number[i]<<" ";
}

fout1.close();
fout2.close();
getch();
return 0;

}

this code written in turbo c++ compiles & givs success.....
bt showing error while run......
can anyone help me with this code...
pls mail the copy of correct code to [email protected] 

Reply via email to