hi all post #1 :]
i've got a file that is generated by a program i've made. the first few lines of the file are comments, deliminated by #'s. i'd like to be able to do a fscanf on each line of the file, disregarding the first few lines, to input data. now the number of commented lines at the top of the file may be a few or a bunch. here is an example of the file i'm talking about...
# a bunch of commments here...
# cprogramming.c is cool!
# etc...
prog etc and so on
i need to find the first occurance of the word "prog" because that is the line at which my "important" data starts. is there a simple way to do this? i was thinking read each word into a string and strcmp it for "prog" but i'm sure it can be done more efficiently. thanks!
-justin