When I run check50 on my code, I apparently initialised the board wrong. https://sandbox.cs50.net/checks/e8394a83a4b645199b6b74abbb525f89

  • Have you tried printing your board out? What is your output?
    – Gabe
    Commented Sep 2, 2016 at 22:26

1 Answer 1


check50 has a lot of dependencies in order to work. One of them is that the blank tile is stored as 0 in the board[][] array. Your code appears to change that to -1, which takes up an extra character in the log file output.

If you change your code to simply use 0 as the blank, it is likely to work. You might also find it useful to carefully review the code in main().

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

  • My problem is that I did use 0, but it broke so many things, since the rest of the empty board is also 0s, it causes weird glitches, thus why I used -1. The spec did say you can use any character to represent the empty space.
    – dehan-jl
    Commented Sep 5, 2016 at 7:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .