My print winner function works and prints the correct winner. I might be overlooking something simple, but I have no idea what it could be.
bool print_winner(void) { // TODO for (int i = 0; i < candidate_count; i++) { if (candidates[i].votes * 2 > voter_count) { printf("%s \n", candidates[i].name); return true; } } return false; }
I keep getting these two errors:
:( print_winner prints name when someone has a majority print_winner did not print winner of election :( print_winner returns true when someone has a majority print_winner did not print winner and then return true
Any help would be greatly appreciated, thank you.