Initialization will set each queen to point to a neighbor, and set column value. C++ version is shown:
main() { Queen * lastQueen = 0; for (int i = 1; i <= 8; i++) lastQueen = new Queen(i, lastQueen); if (lastQueen->first()) lastQueen->print(); } Queen::Queen (int col, Queen * ngh) { column = col; neighbor = ngh; row = 1; }