lets say i there is a file with 2 lines in it. and we going to read from it.
only thing we dont how how many spaces there are. for ex " -hello ", " -hello", "-hello", " -hello "
file.txt
-----------
-hello
-hello 29
-----------
i want to skip line that has only "-hello" in it, NOT "-hello 29"
the way i was think was
char line[20];
//read one line at a time
while((fget(line, 20), finp1)!= NULL)
{
if(strcmp(line, "-hello") != 0)
{
//HERE LINE SHOULD HAVE THE VALUE "-hello 29";
}
}