1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding The Largest Number In A Stucture

  1. Nov 22, 2007 #1
    1. The problem statement, all variables and given/known data
    We are given a structure for a magician. It contains how many different types of tricks they did. We need to write a function that calculates the total number of points they received. So puling a rabbit gets a certain amount of points etc. If they hurt any audience members, they receive zero points.

    Then we write a function that takes an array of Magicians and finds which magician received the most points, using the function we previously created. Then in the body, we initialize an array of 10 Magicians, then call the second function to find the Magician who received the most points, and the we need to print out their data.

    3. The attempt at a solution
    http://cpp.tastethepaste.org/2013
    Here is my attempt. What happens is that everytime, it returns the Magician with index zero. Please help!
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?