Searching an array for match, and bringing back associated subscript.
Posted on 1998-04-15
I need to prompt the user for a golfer id, search the array for the golfer id, and return the subscript of the location in the array. How do I do this in main, and how do I write my function? I'm trying to report golf scores. The search consists of fields golfer id, golfer name, average score, rating. The report format looks like this:
golfer id golfer name avg score rating
52 smith 52 a
36 jones 41 b
please help. I need the way to declare, to call in main, and the actual function to do this.
Thanks for you help.