From your second while loop...
Note that you are declaring idNum but never intializing it to a value.
If you wanted to use the one declared at the top of main (which would make sense) you should not redeclare it here.
Ok, I took all of the advice you all posted but for some reason my code still isn't printing the proper results. It only prints not found.
CommonTater, what I'm trying to do in the second while loop is read in the second infile, which is supposed to be an array of integers, i.e. 5 2 7 which are also the same id numbers from the first infile. Then using those numbers it searches the first array from the first infile and locates the id numbers 5 2 7. Here's where I'm not really sure what is supposed to happen, I think once it locates those Id numbers it is supposed to return and print out the id numbers and the corresponding scores from the first infile. The first infile has Id numbers and scores, the variables for them are id and score, the second infile only has the id numbers.
Then you are not fully prepared to write this program. I don't care what a person's IQ is or how much schooling with a comp-sci major they have, I don't even care if they came up through the school of hard knocks... there isn't a programmer alive who can write a solution to a problem he doesn't understand...
Originally Posted by foxx2jett
You would probably be well served to sit down and work this problem on paper until you understand what's supposed to happen...
(hint: It will probably turn out that you need to load both files into arrays and work from there.)
Ok, will do. I'll see if I can figure it out.
Thanks all. I appreciate your help.