myfileRandom.open("random.log", ios::ate);
what peter said, or don't close the file until the end of your program.
ios::app -- Append to the file
ios::ate -- Set the current position to the end
ios::trunc -- Delete everything in the file
Last edited on
Thank you guys! works now