a c++ version of secret number.