Code base for problem queen attack in c++

I think this is an easy problem, but I can’t solve it because I don’t have the proper code that matches with testing code. Can somebody provide a code that has to be filled with the solution asked? I will appreciate it very much.

I believe part of the exercise is to read the tests/test output to figure out what the code needs to contain.