Move generation n c++ for Knight
Of course this can be improved. Look at all the repetition... then, factor it out into a function. You'll end up with something like this:
pseudomoves.push_back_if_legal(row, col, row-1, col+2);
pseudomoves.push_back_if_legal(row, col, row-2, col+1);
pseudomoves.push_back_if_legal(row, col, row+1, col+2);
pseudomoves.push_back_if_legal(row, col, row+2, col+1);
pseudomoves.push_back_if_legal(row, col, row+2, col-1);
pseudomoves.push_back_if_legal(row, col, row+1, col-2);
pseudomoves.push_back_if_legal(row, col, row-2, col-1);
pseudomoves.push_back_if_legal(row, col, row-2, col-1);

As a bonus, it is now relatively obvious where the bug is!