How can you open a text file and append all its lines to another text file in C++? I find mostly solutions for separate reading from a file to a string, and writing from a string to a file. Can this elegantly be combined?
It is not always given that both files exist. There should be a bool return when accessing each of the files.
I'm sorry if this is already off-topic: Is appending text content to a file conflict-free in the meaning that multiple programs can do this simultaneously (the order of the lines DOESN'T matter) ? If not, what would be an (atomic) alternative?