What’s the difference between ios::ate and ios:app when writing to a file.
In my view, ios::app gives you the ability to move around in the file, whereas with ios::ate it can only read/write at the end of the file. Is this correct?
What’s the difference between ios::ate and ios:app when writing to a file. In my
Share
It’s the other way around. When
ios::ateis set, the initial position will be the end of the file, but you are free to seek thereafter. Whenios::appis set, all output operations are performed at the end of the file. Since all writes are implicitly preceded by seeks, there is no way to write elsewhere.