Saturday, November 12, 2011

Fscanf in C to read multiple lines?

Uh, yeah. If you can separate the functions, and read the files in one function while adding them to your list in another, then it will be easier to see what isn't happening. In the read function have a line to start which says you are in the function, and one at the end like the one on your thing. If it only enters that function once then the problem is the loop. If it enters it more times than that then you will find where the problem is. But functions should do one thing and do it well, so if you are creating the struct empd and reading in the data that might be acceptable -- but put it on the list in a separate, calling function.

No comments:

Post a Comment