diff options
Diffstat (limited to 'wk3/pset/runoff')
-rw-r--r-- | wk3/pset/runoff/runoff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wk3/pset/runoff/runoff.c b/wk3/pset/runoff/runoff.c index 17b4bf2..6fdfbe5 100644 --- a/wk3/pset/runoff/runoff.c +++ b/wk3/pset/runoff/runoff.c @@ -7,7 +7,7 @@ #define MAX_CANDIDATES 9 // preferences[i][j] is jth preference for voter i -int preferences[MAX_VOTERS][MAX_CANDIDATES]; +string preferences[MAX_VOTERS][MAX_CANDIDATES]; // Candidates have name, vote count, eliminated status typedef struct @@ -168,7 +168,7 @@ bool print_winner(void) { if (candidates[i].votes > (voter_count / 2)) { - printf("%s", candidate.name); + printf("%s", candidates[i].name); } } return false; |