You should check whether the file was opened successfully.
yes that is checked before operation6 is ran
file.c_str
should be file.c_str()
.
I do not see where this check is. I see an invalid statement instead
outfile.open(file.c_str, ios_base::ate );
Shall be
outfile.open(file.c_str(), ios_base::ate );
ah ok, thought you didn't need those when there was more after.
Thanks guys but now its still overwriting the file.
Maybe try ios_base::app
rather than ios_base::ate
awesome thankyou it works