Master the classic N-Queens puzzle. Write a C++ backtracking algorithm to place N queens on an NxN chessboard without them attacking each other.