i have proramm which reads a *.cap file
i open this cap. file in binary format to read it,
now i want to write also an output file in this format output.cap.
i did that, i becam no errors and it works.
but when i tried to open this file
output.cap i becam an error as it's not a caputure file
my code is:( in this code i just try to read 4 variables and to write them in the outputfile)
Expand|Select|Wrap|Line Numbers
- string infile,outfile;
- char a,b,c,d;
- void main ()
- {
- cout<<"Enter your input filename"<<endl;
- cin>>infile;
- ifstream myinfile;
- myinfile.open(infile.c_str(), ios::binary );
- cout<<"Enter your output filename"<<endl;
- cin>>outfile;
- ofstream myoutfile;
- myoutfile.open(outfile.c_str(), ios :: binary);
- myinfile>>a>>b>>c>>d;
- myoutfile<<a<<b<<c<<d;
- }