I know how to add text to a file in C but it deletes everthing in the file im adding it to, how would i do it so it adds a new line were i tell it to?
Printable View
I know how to add text to a file in C but it deletes everthing in the file im adding it to, how would i do it so it adds a new line were i tell it to?
Try to open the file in append mode.
if you use the fopen change the ios::out
to ios::app
you can then add to the end of the file
delete a txt file all together??
remove("readme.txt"); I think