Skip the first line when reading from a file?
Hello!
I'm trying to read a file with sscanf. The format looks like this:
"number
text text number
text text number
etc."
and I have this:
Code:
while (fgets(line, BUFSIZE, infilep) != NULL) {
minfo *minfop = malloc(sizeof(minfo));
sscanf(line, "%[^ ] %[^ ] %s",
minfop->v1, minfop->v2, minfop->e);
I'm saving the structs to a list later on but that is kind of irrelevant for now. This code works fine, but the thing is I wan't to read only the first line, because that line only has one number. Then I wan't to continue with sscanf, but from the second line.
How do I do this?
Help appreciated!