nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

help in this code

Von: maico (hans.vipin@gmail.com) [Profil]
Datum: 12.04.2009 09:38
Message-ID: <3699a715-6fba-4912-8cc0-b16bcc3f44aa@f41g2000pra.googlegroups.com>
Newsgroup: de.comp.lang.iso-c++
#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;
}


the code compiles giving success in written in turbo c++...
bt showing error in run
can anyone help with this code.

[ Auf dieses Posting antworten ]

Antworten