27.01.2014, 12:59
This is one possibility how to count the lines quite simple:
Код:
fopen(..); new LineCount = 0; while(fread, File, string)) { LineCount ++; } fclose(File); // Close it before removing! if(LineCount == 0) { // No lines found (empty file), remove the file.. fremove(..); }