I have a program written in C++ which accepts text from a user and saves it to a text file using file handles. Here are snippets of the program:
The program works fine. The only problem with it is that it does not append the text to the text file. Rather, it "removes" all the existing text and only saves the new text.
That is, the text saved in a previous session of the program is discarded and the new text is saved instead. How can I solve this problem please?