CS50 AP covers all the same material as CS50x but with additional problem sets (both programming based and writing based) and some extra curriculum that is required for the AP. It is a 36 week course, designed to be completed over the course of a school year. It has a strict deadline of 30 April, after which time problems can no longer be graded. CS50x ...
It's an extra problem for your own learning. It's not required for the certificate and can be submitted but is entirely optional.
You can see the list of problems that are strictly optional (marked with an asterisk) on this wiki
So this is about Sudoku, part of Chapter 4, Module 2 of CS50 AP (not CS50x).
You made a mistake with for (int j = 0; j < 9; j++), you used i instead of j, so you accidentally copy only the first row.
Also, it's placed in the wrong position. At the time you copy, there's nothing to copy. You probably should do that after loading the board (from disk I ...
The won() function won't return a true win. Look at the following code:
for (int i = 0, z = d; i < z; i++)
for (int ii = 0, zz = d; ii < zz; ii++)
if (checker[i][ii] == board[i][ii])
if (correct == (d*d) - 1)
Now, say that d=3. The loop will increment correct ...
That's not a typo. You might notice the footnote link at the end of that sentence that leads to this:
This isn’t necessarily the best practice; you’d typically have all your prototypes in helpers.h, but since check50 references our own helpers.h, for checking purposes, you’ll have to include the prototypes in helpers.c, which is passed in directly ...
Unfortunately, there was a typo in the spec. The first example given was correct:
but when repeated later in the spec, it showed ROFL in error.
This has been corrected. Thanks for the report.
The spec is perfectly correct. More than likely, you don't have
At the very top of your program (ie, before any other #includes). If you move that to the top even above the other includes in your header, it will compile fine.