< Previous | Contents | Next >

Summary

In this chapter, you should have learned the following concepts:

n Cþþ is the primary language used in AAA game programming.

n A program is a series of Cþþ statements.

n The basic lifecycle of a Cþþ program is idea, plan, source code, object file, executable.

n Programming errors tend to fall into three categoriescompile errors, link errors, and run-time errors.

n A function is a group of programming statements that can do some work and return a value.

n Every program must contain a main() function, which is the starting point of the program.

n The #include directive tells the preprocessor to include another file in the current one.

n The standard library is a set of files that you can include in your program files to handle basic functions like input and output.

36 Chapter 1 n Types, Variables, and Standard I/O: Lost Fortune


n iostream, which is part of the standard library, is a file that contains code to help with standard input and output.

n The std namespace includes elements from the standard library. To access an element from the namespace, you need to prefix the element with std:: or employ using.

n cout is an object, defined in the file iostream, thats used to send data to the standard output stream (generally the computer screen).

n cin is an object, defined in the file iostream, thats used to get data from the standard input stream (generally the keyboard).

n Cþþ has built-in arithmetic operators, such as the familiar addition, subtraction, multiplication, and divisionand even the unfamiliar modulus.

n Cþþ defines fundamental types for Boolean, single-character, integer, and floating point values.

n The Cþþ standard library provides a type of object (string) for strings.

n You can use typedef to create a new name for an existing type.

n A constant is a name for an unchangeable value.

n An enumeration is a sequence of unsigned int constants.