I

An identifier is a user-defined name; both function names and variable names are identifiers. Identifiers must not conflict with keywords such as if and for; for example, you cannot create a function or a variable with the name for.

An if statement is a statement that causes its controlled block to be executed if the logical expression specified in the if statement is true.

An ifstream (pronounced “i f stream”) is a stream used for input from a file.

Implementation; see class implementation.

An implementation file contains source code statements that are turned into executable code by a compiler. In this book, implementation files have the extension .cpp.

An implicit conversion is one that occurs without the programmer's explicit request. Also see explicit.

Include; see #include statement.

An include guard is a mechanism used to prevent the same class definition from being included in the same source code file more than once.

To increment a variable means to add 1 to its value. This can be done in C++ by using the increment operator, ++.

An index is an expression used to select one of a number of elements of a vector or an array. It is enclosed in square brackets ([ ]). For example, in the expression a[i+1], the index is the expression i+1.

An index variable is a variable used to hold an index into a vector or an array.

Inheritance is the definition of one class as a more specific version of another previously defined class. The newly defined class is called the derived (or sometimes the child) class, while the previously defined class is called the base (or sometimes the parent) class. In this book, we use the terms base and derived. The derived class inherits all of the member variables and regular member functions from the base class. Inheritance is one of the primary organizing principles of object-oriented programming.

Initialization is the process of setting the initial value of a variable or const. It is very similar to assignment but not identical. Initialization is done only when a variable or const is created, whereas a variable can be assigned to as many times as desired. A const, however, cannot be assigned to at all, so it must be initialized when it is created.

Input is the process of reading data into the computer from the outside world. A very commonly used source of input for simple programs is the keyboard.

Instruction; see machine instruction.

An int (short for integer) is a type of integer variable. While the C++ language definition requires only that an int be at least as long as a short and no longer than a long, with most current C++ compilers this type is equivalent to either a short or a long, depending on the compiler you are using. A 16-bit compiler, such as Borland C++ 3.1, has 16-bit (2-byte) ints that are the same size as shorts. A 32-bit compiler, such as the one on the CD in the back of the book, has 32-bit (4-byte) ints that are the same size as longs.

An integer variable is a C++ representation of a whole number. Unlike mathematical integers, C++ integers have a limited range, which varies depending on their types. See the individual types char, short, int, and long for details. The type bool is sometimes also considered an integer variable type.

Integral type: see integer variable.

Interface; see class interface.

Interface file; see header file.

Internal polymorphism; see polymorphic object.

I/O is an abbreviation for “input/output”. This refers to the process of getting information into and out of the computer. See input and output for more details.

iostream is the name of the header file that tells the compiler how to compile code that uses predefined stream variables like cout and cin and operators like << and >>.

An object of a derived class is said to have an “isA” relationship with its base class if the derived class object can properly be substituted for a base class object. In C++, objects of publicly derived classes should have this relationship with their base classes.

An istream is a stream used for input. For example, cin is a predefined istream that reads characters from the keyboard.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset