24.02.2013, 13:47
Quote:
Its this.
Код:
fdeleteline(filename[], line) { new count, string[256], File:file, File:temp; file= fopen(filename, io_read); temp = fopen("tmpfile.tmp", io_write); while (fread(file, string)) if (++count != line) fwrite(temp, string); fclose(file); fclose(temp); file= fopen(filename, io_write); temp = fopen("tmpfile.tmp", io_read); while (fread(temp, string)) fwrite(file, string); fclose(file); fclose(temp); fremove("tmpfile.tmp"); } |