The easiest way would be to use the ios::app flag, this will open the file in append mode if the file exists, if it can't find the file, a new one will be created.
ofstream myfile;
myfile.open("path\filename.ext", ios::app );
Cheers for now,
Jas.