ios::ate means you can append to the file from any position you specify within the file. So if you do not specify the position of the file to be written too, it will act like ios::trunc.
ios::trunc ( truncate ) just means it starts the file fresh as if it was empty. So what most people do is read the file in as a buffer .. change it.. and then write it all back out to the file.