// open for output in append mode (create a new file only if the file does not exist) std::ofstream file( file_name, std::ios::app ) ;