I'm opening a file with fopen and "r+a"
and after a while i'm trying to add strings that way:
Code:
char *line = (char *) malloc(MAX_LINE); while (fgets(line, sizeof(line), theFile) != NULL) if (strstr(line, "I want to append here") != NULL) fputs("My new string", theFile);