Hi!
My problem is this:
I have a text file with the following content:
4 koira dog
7 keppi stick
4 lehti leaf
9 kissa cat
6 pallo ball
I want to remove one line from the text file with my c code:
void DeleteWord(char word[40], FILE *in) {
tests if the word is in the file;
deletes the line that containes word[40];
}
if I remove the line with "lehti", the result would be:
4 koira dog
7 keppi stick
9 kissa cat
6 pallo ball
I couldn't find any functions that does this in c. Any ideas?
My problem is this:
I have a text file with the following content:
4 koira dog
7 keppi stick
4 lehti leaf
9 kissa cat
6 pallo ball
I want to remove one line from the text file with my c code:
void DeleteWord(char word[40], FILE *in) {
tests if the word is in the file;
deletes the line that containes word[40];
}
if I remove the line with "lehti", the result would be:
4 koira dog
7 keppi stick
9 kissa cat
6 pallo ball
I couldn't find any functions that does this in c. Any ideas?