First version of N queens implementation c++