Hello everyone. First off, not only am I just starting with C++ but this is also one of my first posts on this forum, so I'm sorry if this is in the wrong place or something.
Anyway, I'm trying to overwrite a certain line of a text file. While I have found solutions on the web, they all work by the search function. I need to print to a certain line (ex. print 8 on line 3) without knowing the current int on that line. The code I have written so far only writes, so any help would be appreciated.
The easiest way is to read from the existing file and write the desired items to a new file, then delete or rename the original file and rename the new file to the original name.