CPP version of Conway_Sequence puzzle