In my own testing my fifteen game compiles without errors and works perfectly. However, when I checked it with check50 it said that it couldn't initialize the boards correctly, and I got this:

enter image description here

Then I looked at the detailed check and found this:

enter image description here

It's cut off, but on the right it says the error is from line 24, which is calling the math library.

The same error occurs with the 4x4 board.

Any idea what this means/how to fix it? It seems like its an error with one of the libraries, which is strange. It might have something to do with the "-D__useconds_t=long Dusleep=fabs" in the command line, but there's no way for me to change that (is there?).


You can't use the math.h library in this pset due to some definition added to the clang arguments that redefines the fabs from that library, so including the math.h library won't allow it to compile for check50 or the grader.

Remove that #include <math.h> from your code and it should work.

If this answers your question, please click the check mark to accept it.

  • 1
    Great tip!! Thanks so much. Dec 27 '16 at 0:14

I will try to tackle this problem from a simple point of view. Since init() doesn't initialize correctly, I suggest you try to run the program yourself and check at the log.txt to look at the values inside of it.

You must log in to answer this question.

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