C++ NQueens implementation, credits to https://github.com/reem/rust-n-queens