title: CS50, Plurality question, gives the wrong result
body: <p>Here is the plurality problem from CS50
  I can't find fix the problem, please help</p>
  
  <p>P.S I have another problem now, if there are 2 voters,1 is Alice,2nd is Bob
  the program should print out both as winners, but it gives out first candidate as a winner,how to deal with it?</p>
  
  <p>//Update vote totals given a new vote</p>
  
  <pre><code>bool vote(string name){
    for(int i=0;i&lt;candidate_count; i++){
      if(strcmp(candidates[i].name,name)==0){
        candidates[i].vote++;
        return true;
      }
    }
    return false;
  }
  </code></pre>
  
  <p>//Print the winner (ot winners)of the election</p>
  
  <pre><code>void print_winner(void){
    int MaxVote=0;
    string Winner;
    for(int i=0;i&lt;candidate_count; i++){
      if(candidates[i].vote&gt;MaxVote){
        MaxVote=candidates[i].vote;
        Winner=candidates[i].name;
      }
    }
    for(int i=0;i&lt;candidate_count; i++){
      if(candidates[i].vote==MaxVote){
        printf("%s\n",Winner);
        return;
      }
    }
  }
  </code></pre>
  
  <p>Here is the output</p>
  
  <pre><code>   ~/pset3/plurality/ $ ./plurality Alice Bob
  Number of voters: 2
  Vote: Alice
  Vote: Bob
  Alice
  </code></pre>