I'm trying to read in a header for a dat file which explains what the data in each comma delimited record equals. But the header file changes order so what I need to do is read the header file, break it up (comma dilimited) and determine the data in each record that way. But i'm having trouble figureing out how I should read that header line and break it up.
I've tried doing it this way:
while (d++ <= 3)
i = 0;
while ((C = getc(infile)) != ',')
p[d].structstring[i] = C;
but it doesn't want to break it at the commas correctly, or it doesn't want to save it to the structure created.
Please help me!!!! There has to be an easier way of doing this.
Does anyone have any suggestions?