I've tried a couple things but none of them work. Can anyone show me how to do this please?
This is what I've tried so far. It is a regular text file, opened with "a+".
Also I tried...Code:fseek(filepathA,-2,SEEK_END); char newlinetest=fgetc(filepathA); if (newlinetest >=' ' && newlinetest <='~') fputc((int)'\n',filepathA); fseek(filepathA,0,SEEK_SET);
Code:fseek(filepathA,-2,SEEK_END); char test; test=fgetc(filepathA); if (test==10) printf("\nyes, there is a newline there\n"); else printf("no, there isn't one");