If you look at e.g. this reference, you will see:
app seek to the end of stream before each write
and
ate seek to the end of stream immediately after open
This means that ios::app
only writes at the end, but that ios::ate
reads and writes at the end by default. However, with ios::ate
you can seek freely in the file, but with ios::app
you will always write at the end, no matter what position you set for the writing pointer.