Hi! Been reading this board for awhile, and cannot figure something out.
I'm using fscanf to read multiple lines from a text file... however some lines have less information then the others. I.E:
A 344532111 S SPY 300 117.880000
R 344532111 SPY 300 117.840000
T 344532111 SPY 100
I need to store in a struct, so I can create a linked list out of it, but I want to set certain variables in the struct to null if it's not in the line. Any efficient way of doing this? Right now I'm only able to correctly store the first line, since it has all the properties I'm using the fscanf for. fscanf(fp,"%s %d %s %s %d %lf",.....);
Thanks for any help, let me know if you need me to post any further code.