In C++, I need to write to an existing file and keep the previous content there.
This is what I have done:
std::ofstream logging;
logging.open(FILENAME);
logging << "HELLO\n";
logging.close();
but then my previous text is overwritten (gone). What did I do wrong?
Thanks in advance.