change the Nth value in a .txt file

Hello I have a .txt file which contains a large amount of ones and zeros (tile map for a game)
and basically I just want to know how to change say just the 12th value in the file from a 1 to 0

ThankYou
Seek to it, and overwrite it. You're lucky they're the same length and you can just overwrite that one bit of info, rather than have to rewrite the whole rest of the file.

http://www.cplusplus.com/reference/ostream/ostream/seekp/
Last edited on
ThankYou this works ;)
Topic archived. No new replies allowed.