The C++Course provides a general introduction to programming in C++. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details.


Glossary D...I

dead codePart of a program that can never be executed, often because it appears after a return statement.
debuggingThe process of finding and removing any of the three kinds of errors.
declarationA statement that creates a new variable and determines its type.
decrementDecrease the value of a variable by one. The decrement operator in C++ is --.
deep equalityEquality of values. Two references that point to objects that have the same value.
deletean operator that returns the memory pointed to by a pointer to the free store (a special pool of free memory that each program has)
delimiterA character that is used to separate tokens, like the punctuation in a natural language.
deterministicA program that does the same thing every time it is run.
development planA 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.
dictionaryAnother name for a table.
dot notationThe method C++ uses to refer to member variables and functions. The format is className.memberName.
dynamic memory allocationthe explicit allocation of contiguous blocks of memory at any time in a program.
elementOne of the values in a vector. The [] operator selects elements of a vector.
encapsulateTo divide a large complex program into components (like functions) and isolate the components from each other (for example, by using local variables).
encodeTo represent one set of values using another set of values, by constructing a mapping between them.
entryAn element in a table that contains a key-value pair.
exceptionA run time error. Exceptions cause the execution of a program to terminate.
executableAnother name for object code that is ready to be executed.
explicitAnything that is spelled out completely. Within a nonmember function, all references to the instance variables have to be explicit.
expressionA 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 functionA function that takes an "empty" object as a parameter and fills it its instance variables instead of generating a return value.
flagA variable (usually type bool) that records a condition or status information.
floating-pointA 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 languageAny of the languages people have designed for specific purposes, like representing mathematical ideas or computer programs. All programming languages are formal languages.
fractalA kind of image that is defined recursively, so that each part of the image is a smaller version of the whole.
function declarationA 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.
functionA 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 styleA style of program design in which the majority of functions are pure.
garbage collectionThe process of finding objects that have no references and reclaiming their storage space.
generalizeTo 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 structureA kind of data structure that can contain data of any type.
hash codeThe integer value that corresponds to a given value.
hash functionA function that maps values of a certain type onto integers.
hash tableA particularly efficient implementation of a table.
heapsortYet another sorting algorithm.
helper functionOften a small function that does not do anything enormously useful by itself, but which helps another, more useful, function.
high-level languageA programming language like C++ that is designed to be easy for humans to read and write.
histogramA vector of integers where each integer counts the number of values that fall into a certain range.
implementationThe body of a function, or the details of how a function works.
implicitAnything that is left unsaid or implied. Within a member function, you can refer to the instance variables implicitly (without naming the object).
incrementIncrease 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.
indexA 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 loopA loop whose condition is always true.
infinite recursionA function that calls itself recursively without every reaching the base case. Eventually an infinite recursion will cause a run-time error.
infixA way of writing mathematical expressions with the operators between the operands.
initializationA statement that declares a new variable and assigns a value to it at the same time.
inorderA way to traverse a tree, visiting the left subtree, then the root, then the right subtree.
instance variableOne of the named data items that make up an structure. Each structure has its own copy of the instance variables for its type.
instanceAn example from a category. My cat is an instance of the category "feline things." Every object is an instance of some type.
interfaceA description of how a function is used, including the number and types of the parameters and the type of the return value.
interpretTo execute a program in a high-level language by translating it one line at a time.
invariantA 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.
invokeTo call a function "on" an object, in order to pass the object as an implicit parameter.
iterationOne pass through (execution of) the body of the loop, including the evaluation of the condition.


Last Update: 2005-11-22