Quote:
Originally Posted by Toa Circuit
Using ofstream is fine... but one thing. When you create or open ofstream objects, the file is cleared out.
|
Open it with std::ios_base::app
Code:
std::ofstream::open("filename.txt", std::ios_base::out | std::ios_base::app);
It will append to the file instead of truncating it.