[vtkusers] saving in a file xyz witch does exist
kaouther
boutara.kaouther at gmail.com
Tue Aug 21 10:53:06 EDT 2012
hi all ,i have a problem in saving a file xyz
well this the code
FILE *file = fopen("file.xyz", "r");
if(file == NULL){ //if the file doesn't exist the it will creat a new
file and save it
writer =vtkSmartPointer<vtkSimplePointsWriter>::New();
writer->SetFileName("file.xyz");
writer->SetInputConnection(combined->GetProducerPort());
writer->Write();
}else{
std::cout << "file exists." << std::endl;
ofstream fichier ("file.xyz",ios::out | ios::app);
if(fichier) // if the opening was successful
{
cerr << " the opening was successful!" << endl;
*// now here i want the code that makes me save the "combined" in
"file.xyz" without overwrite the existing*
fichier.close(); // close the file
}
else
cerr << "Error opening !" << endl;
}
i wish you can helpe me thank you
--
View this message in context: http://vtk.1045678.n5.nabble.com/saving-in-a-file-xyz-witch-does-exist-tp5715466.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list