dead code | Part of a program that can never be executed, often because it appears after a return statement. |
debugging | The process of finding and removing any of the three kinds of errors. |
declaration | A statement that creates a new variable and determines its type. |
decrement | Decrease the value of a variable by one. The decrement operator in C++ is --. |
deep equality | Equality of values. Two references that point to objects that have the same value. |
delete | an operator that returns the memory pointed to by a pointer to the free store (a special pool of free memory that each program has) |
delimiter | A character that is used to separate tokens, like the punctuation in a natural language. |
deterministic | A program that does the same thing every time it is run. |
development plan | A process for developing a program. In this chapter, I demonstrated a style of development based on developing code to do simple, specific things, and then encapsulating and generalizing. |
dictionary | Another name for a table. |
dot notation | The method C++ uses to refer to member variables and functions. The format is className.memberName. |
dynamic memory allocation | the explicit allocation of contiguous blocks of memory at any time in a program. |
element | One of the values in a vector. The [] operator selects elements of a vector. |
encapsulate | To divide a large complex program into components (like functions) and isolate the components from each other (for example, by using local variables). |
encode | To represent one set of values using another set of values, by constructing a mapping between them. |
entry | An element in a table that contains a key-value pair. |
exception | A run time error. Exceptions cause the execution of a program to terminate. |
executable | Another name for object code that is ready to be executed. |
explicit | Anything that is spelled out completely. Within a nonmember function, all references to the instance variables have to be explicit. |
expression | A combination of variables, operators and values that represents a single result value. Expressions also have types, as determined by their operators and operands. |
FIFO | "first in, first out," a queueing discipline in which the first member to arrive is the first to be removed. |
fill-in function | A function that takes an "empty" object as a parameter and fills it its instance variables instead of generating a return value. |
flag | A variable (usually type bool) that records a condition or status information. |
floating-point | A type of variable (or value) that can contain fractions as well as integers. There are a few floating-point types in C++; the one we use in this book is double. |
formal language | Any of the languages people have designed for specific purposes, like representing mathematical ideas or computer programs. All programming languages are formal languages. |
fractal | A kind of image that is defined recursively, so that each part of the image is a smaller version of the whole. |
function declaration | A statement that declares the interface to a function without providing the body. Declarations of member functions appear inside structure definitions even if the definitions appear outside. |
function | A named sequence of statements that performs some useful function. Functions may or may not take parameters, and may or may not produce a result. |
functional programming style | A style of program design in which the majority of functions are pure. |
garbage collection | The process of finding objects that have no references and reclaiming their storage space. |
generalize | To replace something unnecessarily specific (like a constant value) with something appropriately general (like a variable or parameter). Generalization makes code more versatile, more likely to be reused, and sometimes even easier to write. |
generic data structure | A kind of data structure that can contain data of any type. |
hash code | The integer value that corresponds to a given value. |
hash function | A function that maps values of a certain type onto integers. |
hash table | A particularly efficient implementation of a table. |
heapsort | Yet another sorting algorithm. |
helper function | Often a small function that does not do anything enormously useful by itself, but which helps another, more useful, function. |
high-level language | A programming language like C++ that is designed to be easy for humans to read and write. |
histogram | A vector of integers where each integer counts the number of values that fall into a certain range. |
implementation | The body of a function, or the details of how a function works. |
implicit | Anything that is left unsaid or implied. Within a member function, you can refer to the instance variables implicitly (without naming the object). |
increment | Increase the value of a variable by one. The increment operator in C++ is ++. In fact, that's why C++ is called C++, because it is meant to be one better than C. |
index | A variable or value used to select one of the members of an ordered set, like a character from a string, or the element of a vector. |
infinite loop | A loop whose condition is always true. |
infinite recursion | A function that calls itself recursively without every reaching the base case. Eventually an infinite recursion will cause a run-time error. |
infix | A way of writing mathematical expressions with the operators between the operands. |
initialization | A statement that declares a new variable and assigns a value to it at the same time. |
inorder | A way to traverse a tree, visiting the left subtree, then the root, then the right subtree. |
instance variable | One of the named data items that make up an structure. Each structure has its own copy of the instance variables for its type. |
instance | An example from a category. My cat is an instance of the category "feline things." Every object is an instance of some type. |
interface | A description of how a function is used, including the number and types of the parameters and the type of the return value. |
interpret | To execute a program in a high-level language by translating it one line at a time. |
invariant | A condition, usually pertaining to an object, that should be true at all times in client code, and that should be maintained by all member functions. |
invoke | To call a function "on" an object, in order to pass the object as an implicit parameter. |
iteration | One pass through (execution of) the body of the loop, including the evaluation of the condition. |