I was wondering how, in C++, you would go about modifying a certain line of a file and replacing it with another string. For example, I want to replace line 16 on file "lines.txt" with the string:
This is line 16.
Is this possible? Or if not, is it possible to do a search for a string and to replace it? For example, replacing the string "This is line 15" with the string "This is not line 16." Thanks in advance.