Chapter 7: Controlling Program Flow


Overview

Constants and variables are useful for storing numerical and alphabetical data, and later sections of this book examine how they are used to store other sorts of information. Arrays have also been explored, specifically with regard to their importance for organizing data. This chapter naturally extends from those topics and examines how the program can make decisions based upon the values of variables and constants. This chapter also examines the potential for processing large quantities of data using loops. Specifically, the following subjects are explained:

  • Handling user input

  • Conditional operators

  • If statements

  • If Else statements

  • Logical operators

  • Switch statements

  • For loops

  • While loops

  • Do-While loops




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

Similar book on Amazon
Beginning C++ Through Game Programming
Beginning C++ Through Game Programming
Beginning Game Programming
Beginning Game Programming
The Ultimate Guide to Video Game Writing and Design
The Ultimate Guide to Video Game Writing and Design

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net