Don't lie to sscanf about the format of your strings.%s %d %d %d
Don't lie to sscanf about the format of your strings.%s %d %d %d
But that is the format..
Example 45 40 40
Second 62 61 63
Is that not correct?
Look at your first post:afile.txt contains:
/*
City Distance1 Distance2 AvgDistance
Miami 50 60
Montreal 90 65
Vancouver 87 63
Quzah.
Hope is the first step on the road to disappointment.
Oh, no sorry. I just used that as an example. The actual file has more than 2 values in each line. What I'm suppose to do is, read in the files, store them and then apply another file that has the rules for what's suppose to happen, and in the end write to the initial files opened.
So, I guess you'd better get to work planning and writing...
If you get stuck, post up your code and we'll see what we can do to help.
But we are not going to do it for you. (Or at least I'm not...)