From the File menu, select New and then Project…. From the Project types pane, under Visual C++, select Win32. From the Templates pane, select Win32 Console Application. Choose a name for the project, such as MathFuncsLib, and enter it in the Name field. Choose a name for the solution, such as StaticLibrary, and enter it in the Solution Name field. Press OK to start the Win32 application wizard. From the Overview page of the Win32 Application Wizard dialog, press Next. From the Application Settings page of the Win32 Application Wizard, under Application type, select Static library. From the Application Settings page of the Win32 Application Wizard, under Additional options, deselect Pre-compiled header. Press Finish to create the project.
Time for us to start writing computer games! This first one will be a bit simple, but it's a start. Our task is to write a program that implements a guessing game. Our program generates a random number between 0 and 100. The player must guess the secret number. The program provides hints like "that's too high" or "that's too low" until the player finally guesses the secret number. We will work on this game in three steps. Figure out how to generate a random number within a given range of values. Create a main function that processes one guess from the player, and provides hints. Add what we need to allow for multiple guesses until the player guesses the number. This process of development is called decomposition, which means breaking a task into sub-tasks, each of which is easy to do. Starting with step 1, do a Google search to see how to generate a random number using C++. Try searching on "rand C++". // random.cpp. Maggie Johnson //...