Problem processing a file
Posted on 2004-10-17
I have a while loop that calls a function that passes a pointer to a file. The while loop calls one of two functions depending on the info it read from a file. When it goes to the function it processses for more info from the file. Then it repeats the process.
The problem is when it repeats the process, it gets the same data as the last data it get from the file repeatedly. Ex. it got the number 2 for the last time through the first run of the function. The next time it runs through the function every variable is assigned two. The file stops being progressed through. I am using fgets. And calling the function by function(*FILE)
Any help would be appreciated