C++ Game Programming[1]
From book 《Beginning C++ Through Game Programming, 4th EDITION》Michael Dawson
1 Guess Number!
Basic ideas: The program will generate a random number. And you can input your guess to the program, then the program will tell you too high or too low, then you can modify your guess according to the response.
Here is a simple c++ example:
#include <iostream>
using namespace std;
int main()
{
// seed random number generator
int secre