[Solved] How to Read and write into/from a text file?
This line fprintf(l_pFile, sVar); doesn’t look right. I think it should be fprintf(l_pFile, “%s\n”, (LPCTSTR) sVar); The loop could become infinite if the file has less than two linefeeds: while(count != 2) I think it should be: while( (count < 2) && ( ! feof(l_pFile) ) && ( c != EOF ) ) Probably unrelated … Read more