Originally Posted by cigarstub
I really do not know the optimy way dealing w/ "editing a file"
how to open ? Is it fopen("a pointer", "the filename")
to write n save immediatr ? is it append("a string","to the file") then Must I close the file to save the change or no need since I do not want this method
how to go to a specific line in txt file ?
how to return to the previous line after appending ?
Could u write me a sample code doing all these ?
yes, it is fopen (or) open to a file
to write and save immediately fwrite and flush it
if you are using write no need to flush it
if you close the file; implicitly contents in file buffer would be flushed and stored
to go specific line -> fseek
check man pages for all the system calls