Can anyone please help, I'm trying to read a file into my program and what I would like to do is ignore any line starting with a # and the subsequent lines that start with & tokenise.
for example an extract of the file I'm working with:
# SCM Students
&ABBOTT DARREN - 01 MSc COMP AIDED GRAPHICAL TECHNOLOGY APPLICATIONS
&ACHMET ALPER - 02 CERTIFICATE IN PROFESSIONAL DEVELOPMENT
What I want to be able to do is ignore the first line of the code then when we see & I would like to be able to tokenise ABBOTT and also DARREN.
I am new to C programming and to be honest I'm going round in circles any help would be very very welcome because I'm loosing the will to live.
At the moment all I've been able to do with any success is to get the file read in and to get the file printed out.
This is what I have so far, pretty lame I know.
char buffer ;
while (fgets(buffer,101,ifp) != NULL)
Thanks again for any help
I'm using a compilier called Pacific C with non ansci c features disabled