Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5
When file is in "ios::ate" mode, then the write pointer of the file is transferred to the end of the file only at the time of opening it, means you can change the location of it ( using seekp() ) anytime to write anywhere else in the file. In case of "ios::app", write pointer is placed at the end of the file before every writing operations, means no matter how much you move the pointer ( using seekp() ), everytime you would try to write something to the file, the write pointer would be relocated at the end and contents would always be appended at the end of the file.
14th Apr 2021, 4:47 AM
Arsenic
Arsenic - avatar