Having problems reading info from a data file into an array of structures. The first time through, it gets the origin state and destin city correct, but all the other information is wrong. The origin City is storing the first three letters of the origin city, but also the origin state. (ie BalMD instead of Baltimore).
Also, I'm not sure waht the "200" means in fgets. I've toyed around with that ranging anywhere from 100 to 1000, but still get the same results.
typedef struct leg
struct leg *GetLegInfo (int numLegs, FILE *ifp, LEG *legs)
for (i = 0; i < numLegs; i++)
/* fill arrary of legs */
fgets (legs[i].originCity, 200, ifp);
fgets (legs[i].originState, 200, ifp);
fgets (legs[i].destinCity, 200, ifp);
fgets (legs[i].destinState, 200, ifp);
fscanf (ifp, "%d", &legs[i].nights);
fscanf (ifp, "%d", &legs[i].miles);