6.1 Constants


6.1 Constants

Something is said to be constant when it does not change. The color of a bus could be red, blue, green, or any other color, and this can change over time if it is repainted. So the color of a bus is not constant. The value 5, however, is constant. And so is a triangle. 5 will always be 5, in the same way a triangle will always be a triangle. Constants in programming, therefore, represent quantities that cannot change throughout the duration of a program.




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

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