I need to write back to the beginning of a file with overwritting it.
Currently it opens without truncation but writes to the end of the file. How can I set it to the beginning?

Code:
outfile.open(fileName, ios::in|ios::nocreate|ios::app);
thanx