Questions tagged [pset3plurality]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

check50 for plurality

Every example I try myself works perfectly fine but once I check50 it, I get error messages for not printing one,two, or all three winners. I saw some people having format issues with spaces, but I ...
0
votes
0answers
8 views

CS50 pset 3 Plurality - Works until…Segmentation fault, and not enough vote prompts?

Task is to have people type in their votes for the candidates given in the command line, then the most voted candidate wins. I only need to and am allowed to write code for the last two function ...
1
vote
1answer
56 views

pset3 Plurality

Having an issure writing my plurality code pset. i wanted to have my programme promt a user when they have made an invalid vote entry. and it works ok but ive found a bug while testing it: code: #...
0
votes
1answer
37 views

pset 3 plurality

To figure out the winner, I am trying to do a bubble sort and then print the last name (or names if the last two are tied). For some reason, after it goes through the first run-through of the bubble ...
0
votes
2answers
165 views

CS50 pset3 plurality program gives error for print_winner function (did not print both winners of election)

I have finished the plurality program for pset3 of cs50, but upon running check50 on my code, I receive the following error directed towards the print_winner function: :) plurality.c exists :) ...
0
votes
1answer
103 views

Having problems with plurality for cs50

I am trying to run the program for plurality for cs50, and the program compiles I put my candidates in and number of voters and vote, but instead of printing the winner it gives me a segmentation ...
0
votes
1answer
40 views

My Plurality.c works when I test it with all of their usage examples but when I run check or submit it says it doesn't print

I'm a beginner and CS50 is the first coding experience I have. Like the title says, my code works when I test it but the CS50 won't accept it so I'm not sure what's wrong. Thanks for any help! ps. ...
0
votes
3answers
1k views

pset 3 plurality code help

My code prints all names in the case of a two way/threeway tie, but for some reason I still get an error message in check50 that it does not. The only thing I could think of was maybe it had to do ...
1
vote
0answers
113 views

Pset 3 Plurality - Error: linker command failed with exit code 1 (use -v to see invocation)

I have come across an unusual situation and I was not able to find a solution on this elsewhere. So for some reason, I was having issue compiling my plurality assignment and it kept on giving me the ...
0
votes
1answer
302 views

Plurality vote strange errors

My code works consistently, but I get these two errors which I check it. I would like to know how to replicate these errors on my own so that I can figure out how to fix them. #include <stdio.h>...
0
votes
1answer
182 views

Plurality segmentation fault

I am getting a segmentation fault despite knowing that the size of the candidates[] array is the same as the value stored in the variable candidate_count and I am iterating through the array from 0 to ...
0
votes
1answer
70 views

why am I getting a segmentation fault?

so this is week three and I know we will learn about memory location next week. However I got a segmentation fault and don't know how to fix it or why it happened. // Update vote totals given a new ...
0
votes
1answer
138 views

why does it not return a value for bool?

So my code does not compile because it does not return a value. I don't know how to make it work and return true and false as it is in the if statement // Update vote totals given a new vote bool ...