C++ User's Guide

Glossary

abstract class

A class that has at least one pure virtual function, and that can be used only as a base class of another class. An abstract class can have no objects of its own created; only objects of a class derived from it.

ANSI C

American National Standards Institute's definition of the C programming language. It is the same as the ISO (International Standards Organization) definition.

ANSI/ISO C++

The American National Standards Institute and the International Standards Organization standard for the C++ programming language.

array

A data structure that stores a collection of values of a single data type consecutively in memory. Each value is accessed by its position in the array.

base class

See inheritance.

binary compatibility

The ability to link object files compiled by one release while using a compiler of a different release.

binding

Tying a function call to a specific function definition. More generally, tying a name to a particular entity.

cfront

A C++ to C compiler program that translates C++ to C source code, which in turn can be compiled by a standard C compiler.

class

A user-defined data type consisting of named data elements (which may be of different types), and a set of operations that can be performed with the data.

class template

A template that describes a set of classes or related data types.

compiler option

An instruction to the compiler that changes its behavior. For example, the -g option tells the compiler to generate data for the debugger. Synonyms: flag, switch.

constructor

A special class member function automatically called by the compiler whenever a class object is created to ensure the initialization of that object's instance variables. The constructor must always have the same name as the class to which it belongs.

data member

An element of a class that is data, as opposed to a function or type definition.

data type

The mechanism that allows the representation of, for example, characters, integers, or floating-point numbers. The type determines the storage allocated to a variable and the operations that can be performed on the variable.

derived class

See inheritance.

destructor

A special class member function automatically called by the compiler whenever a class object is destroyed or the operator delete is applied to a class pointer. The destructor must always have the same name as the class to which it belongs, preceded by a tilde (~). See constructor.

dynamic binding

Connection of the function call to the function body at runtime. Occurs only with virtual functions. Also called late binding, runtime binding.

dynamic cast

A safe method of converting a pointer or reference from its declared type to any type consistent with the dynamic type to which it refers.

dynamic type

The actual type of an object accessed by a pointer or reference that might have a different declared type.

ELF file

Executable and Linking Format file, produced by the compiler.

exception

An error occurring in the normal flow of a program that prevents the program from continuing. Some reasons for errors include memory exhaustion or division by zero.

exception handler

Code specifically written to deal with errors, invoked automatically when an exception occurs for which the handler has been registered.

exception handling

An error recovery process, designed to intercept and prevent errors. During the execution of a program, if a synchronous error is detected, control of the program returns to an exception handler registered at an earlier point in the execution, and the code containing the error is bypassed.

function overloading

Giving the same name, but different argument types and numbers, to different functions. Also called functional polymorphism.

function prototype

A declaration that describes the function's interface with the rest of the program.

function template

A mechanism that allows you to write a single function that you can then use as a model, or pattern, for writing related functions.

idempotent

The property of a header file that including it many times in one translation unit has an effect no different from including it once.

incremental linker

A linker that creates a new executable file by linking only the changed .o files to the previous executable.

inheritance

A feature of object-oriented programming that allows the programmer to derive new classes (derived classes) from existing ones (base classes). There are three kinds of inheritance: public, protected, and private.

inline function

A function that replaces the function call with the actual function code.

instantiation

The process by which a C++ compiler creates a usable function or object (instance) from a template.

ISO

International Organization for Standardization.

K&R C

The de facto C programming language standard developed by Brian Kernighan and Dennis Ritchie prior to ANSI C.

keyword

A word that has unique meaning in a programming language, and that can be used only in a specialized context.

linker

The tool that connects object code and libraries to form a complete, executable program.

lvalue

An expression that designates a location in memory at which a variable's data value is stored. Also, the instance of a variable that appears to the left of the assignment operator.

mangle

See name mangling.

member function

An element of a class that is a function, as opposed to a data or type definition.

method

In some object-oriented languages, another name for a member function.

multiple inheritance

Inheritance of a derived class directly from more than one base class.

multithreading

The software technology that enables the development of parallel applications, whether on single- or multiple-processor systems.

name mangling

In C++, many functions can share the same name, so name alone is not sufficient to distinguish different functions. The compiler solves this problem by name mangling--creating a unique name for the function consisting of some combination of the function name and its parameters--to enable type-safe linkage. Also called name decoration.

namespace

A mechanism that controls the scope of global names by allowing the global space to be divided into uniquely named scopes.

operator overloading

The ability to use the same operator notation to produce different outcomes. A special form of function overloading.

optimization

The process of improving the efficiency of the object code generated by the compiler.

options file

A user-provided file containing options desired for the compilation of templates, as well as source location and other information.

overloading

To give the same name to more than one function or operator.

polymorphism

The ability of a pointer or reference to refer to objects whose dynamic type is different from the declared pointer or reference type.

pragma

A compiler preprocessor directive, or special comment, that instructs the compiler to take a specific action.

runtime type identification (RTTI)

A mechanism that provides a standard method for a program to determine an object type during runtime.

rvalue

The variable located to the right of an assignment operator. The rvalue may be read but not altered.

stab

A symbol table entry generated in the object code. The same format is used in both a.out files and ELF files to contain debugging information.

stack

A data storage method by which data can be added to or removed from only the top of the stack, using a last-in, first-out strategy.

static binding

Connection of a function call to a function body at compile time. Also called early binding.

subroutine

A function. In Fortran, a function that does not return a value.

symbol

A name or label that denotes some program entity.

symbol table

A list of all identifiers present when a program is compiled, their locations in the program, and their attributes. The compiler uses this table to interpret uses of identifiers.

template database

A directory containing all configuration files needed to handle and instantiate the templates required by a program.

template specialization

A specialized instance of a class template member function that overrides the default instantiation when the default cannot handle a given type adequately.

trapping

Interception of an action, such as program execution, in order to take other action. The interception causes the temporary suspension of microprocessor operations and transfers program control to another source.

type

A description of the ways in which a symbol can be used. The basic types are integer and float. All other types are constructed from these basic types by collecting them into arrays, structures, or by adding modifiers such as pointer-to or constant attributes.

VTABLE

A table created by the compiler for each class that contains virtual functions.