Open dimisb opened 7 months ago
// Code passes tests: bool vote(int voter, int rank, string name) { for (int i = 0; i < candidate_count; i++) { // should be if (strcmp(name, candidates[i].name) == 0) if (name == candidates[i].name) { preferences[voter][rank] = i; return true; } } return false;
// Code passes tests: bool vote(int voter, int rank, string name) { for (int i = 0; i < candidate_count; i++) { // should be if (strcmp(name, candidates[i].name) == 0) if (name == candidates[i].name) { preferences[voter][rank] = i; return true; } } return false;