Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Update vote totals given a new vote
- bool vote(string name)
- {
- for (int i = 0; i < 9; i++)
- {
- if (strcmp(candidates[i].name, UNKOWN ) == 0) // for the unknown value i was originally thinking "%s", candidates[i].name
- {
- candidates[i].votes++;
- return true;
- }
- else if (strcmp(candidates[i].name, UNKOWN ) != 0) // for the unknown value i was originally thinking "%s", candidates[i].name
- return false;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement