0

In this case pset3/tideman one test point says: ":( print_winner prints winner of election when one candidate wins over all others" "print_winner did not print winner of election"

despite there it is obvious that the program does print, even the context of that print (last line, one string, single word) is that simple as it could be. Any clue is appreciated, thx, Harry

Output of check50:

https://submit.cs50.io/check50/9409d6a56f69bf9502afb7e479310231c0c776a7

6
  • When you say you're printing "one string, single word", are you also printing the new line character at the end? The test will fail if you don't have that. You'll also get that error message if you're printing correctly, but you're printing the wrong candidate. Unfortunately, there's no way I can tell to get more details about what the test is, and what you're doing wrong.
    – Llenk
    Commented Jun 9, 2020 at 15:06
  • printf("%s\n", candidates[i]); I mean 'wrong candidate' in that context would be like to say 'there is something wrong' - not that much helpful. Really pretty discouraging for complex problems :(. Commented Jun 9, 2020 at 18:11
  • b.t.w. according to the provided case example (and others), the resulting candidate is the correct one. Commented Jun 9, 2020 at 18:25
  • It would be more helpful if you would edit the question and add the following: The complete output of check50, including the link to the results, a sample run, including results that are allegedly not correct, and the code.
    – Cliff B
    Commented Jun 9, 2020 at 18:43
  • What you are asking for (sample run results) are not available as the allegedly not correct results. It is a 'black box', test run (check50), only you can see are the resulting statements, no log nor things like feed data. You know, it's not about to solve a bug in code, it's about testing conclusions. Commented Jun 9, 2020 at 19:00

0

You must log in to answer this question.

Browse other questions tagged .