lundi 23 janvier 2017

How can i change the last line of a text file with c++?

I have a text file by the name of "main.txt" and I just would like to modify the last line of this line. For instance if at the last line there is "last line" I want "end". But in my case, I don't know what there is initially, I just know that it is the last line and the new content.

Have you got an example ?

Thank you very much !

Aucun commentaire:

Enregistrer un commentaire