I have two files, the first one is an ascii file and the second is a
binary one.
I want to add the ascii file on the end of the binary file in order to
obtain a one binary file:
I have done something like this but doesn't work:
int main(int argc, char **argv)
{
double c;
char density[80]="density\0";
ofstream file_vtk(argv[1],ios::out | ios::binary | ios::app);
ifstream file_data(argv[2],ios::in | ios::binary);
while(!file_data)
{
file_data >> c;
file_vtk << c << " " ;
}
file_data.close();
file_vtk.close();
return 0;
}
I'm sure that there is a good way to do this, but I dont have it !!
any suggestions?
regards.
Yous