Quote:
Originally Posted by MaximusBrood
The real content of your text file is this:
test1\ntest2\ntest3\ntest4
If you want to remove the test3 line, remove test3\n
Show your crashing code please.
|
Something like
Code:
new file = fopen(filename,"wt+")
new text[64], text_to_find[] = "lololol"
while(!feof(file))
{
fgets(file, text, 63)
if(contain(text, text_to_find) != -1)
{
fprintf(file, " ")
break
}
}
fclose(file)
This isn't exacly the crash code, but it's the same way.