ios::out is the default flag for ofstream objects. This simply means that it's going to be OUTputting to the file. ios::trunc will erase the data in the file. I believe the flag you want is ios::app which stands for APPend.
My friend thank you very much for your answer...
But the question remains...
The ios::out, don't only make output, but if the file exists, it erases its contents... (try it ....)
The same thing does the ios::trunc, as all of us know !!!
The ios::app I know what it does...
Any ideas my friend ?? I am depending on this site, because I believe that YOU are the people who know the C++ best !!
THANKS IN ADVANCE !!! (again)