Bjarne Stroustrup's C++ Glossary Flashcards

1
Q

!=

A

the inequality operator; compares values for inequality returning a bool.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

define

A

a directive that defines a macro.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

include

A

a mechanism for textual inclusion of one source file into another. Typically used to compose a translation unit out of a .c file and the header files it needs to define its view if the rest of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

+=

A

add–and–assign operator; a+=b is roughly equivalent to a=a+b. Often a useful operation for user–defined types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

.c/.cpp/.cxx file

A

file containing definitions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

<<

A
  1. iostream output operator.
  2. integer left–shift operator.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

=/assignment operator

A

the assignment operator; not an equality operator. = can be used for non-const built-in types (except arrays), enumerations, strings, containers, iterators, complex, and valarray. For a class, = is by default defined member-wise assignment; if necessary, the writer of a class can define it differently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

=0

A

curious notation indicating that a virtual function is a pure virtual function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

>>

A
  1. iostream input operator.
  2. integer right–shift operator.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

==/equality operator

A

the equality operator; compares values for equality returning a bool. == can be used for built–in types, enumerations, strings, iterators, complex, and valarray. == is not by default defined for a class, but a user can define it for a user–defined type. Note that == doesn’t have the naively expected meaning for C–style strings or arrays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

abstract class/abstract type

A

a class defining an interface only; used as a base class. Declaring a member function pure virtual makes its class abstract and prevents creation of objects of the abstract class. Use of abstract classes is one of the most effective ways of minimizing the impact of changes in a C++ program and for minimizing compilation time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

abstraction

A

the act of specifying a general interface hiding implementation details. Classes, abstract classes, and templates are the primary abstraction mechanisms in C++. See also: encapsulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

access control

A

access to bases and members of a class can be controlled by declaring them public, protected, or private.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

adapter

A

a class that takes arguments producing a function object that performs an operation based on those arguments. A simple form of a higher–order function. For example, mem_fun() adapts a member function for use by the standard algorithms. See also: sequence adapter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

address

A

a memory location.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

aggregate

A

an array or a struct without a constructor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

algorithm

A

a precise definition of a computation. The standard library provides about 60 standard algorithms, such as sort(), search(), and copy_unique().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

alignment

A

placing objects in memory to suit hardware requirements. On many machines, an object must be aligned on a word boundary for acceptable performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

allocator

A

object used by standard library containers to allocate and deallocate memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

and

A

synonym for &&, the logical and operator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

application

A

a collection of programs seen as serving a common purpose (usually providing a common interface to their users).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

argument

A

a value passed to a function or a template. In the case of templates, an argument is often a type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

argument passing

A

The semantics of function call is to pass a copy of an argument. The copy operation is defined by the argument type’s copy constructor or by binding to a reference. In either case the semantics is those of initialization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

argument–based lookup

A

lookup of a function name or operator based on the namespace of the arguments or operands. Often called Koenig lookup after Andrew Koenig who proposed the scheme to the standards committee.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

array

A

contiguous sequence of elements. An array doesn’t know its own size; the programmer must take care to avoid range errors. Where possible use the standard library vector.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

auto

A

In C and C++98 a largely useless keyword redundantly indicating stack allocation for local variables. In C++0x a keyword indicating that a variable gets its type from its initializer. For example: double d1 = 2; auto d2 = 3*d1; (d2 will have type double). Primarily useful in generic programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

auto_ptr

A

standard library class template for representing ownership of an object in a way that guarantees proper release (delete) even when an exception is thrown. See also: resource management, resource acquisition is initialization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

back–end

A

the parts of a compiler that generates code given an internal representation of a correct program. This representation is produced by a compiler front–end. See also: front–end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

back_inserter()

A

returns an iterator that can be used to add elements at the back of a container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

bad_alloc

A

standard exception thrown by new in case of failure to allocate free store.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

bad_cast

A

standard exception thrown if a dynamic_cast to a reference fails. TC++PL 15.4.1.1, D&E 14.2.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

base class

A

a class from which another is derived. TC++PL 2.6.2, 12, 15, D&E 2.9.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

base initializer

A

initializer for a base class specified in the constructor for a derived class. TC++PL 12.2.2, 15.2.4.1, D&E 12.9.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

basic guarantee

A

the guarantee that basic invariants are maintained if an exception is thrown and that no resources are leaked/lost. Provided by all standard library operations. See also exception safety, nothrow guarantee, and strong guarantee. TC++PL E.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

basic_string

A

general standard–library string template parameterized by character type. See also: string, C–style string. TC++PL 20.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

binary operator

A

an operator taking two operands, such as /, &&, and binary *.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

binder

A

a function taking a function and a value, returning a function object; when called, that function object will invoke the function with the value as an argument in addition to other arguments supplied in the call. The standard library provides bind1st() and bind2nd() for binding the first and second argument of a binary function, respectively. TC++PL 18.4.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

bit

A

a unit of memory that can hold 0 or 1. An individual bit cannot be directly accessed in C++ (the unit of addressing is a byte), but a bit can be accessed through a bitfield or by using the bitwise logical operators & and |. TC++PL 6.2.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

bitand

A

synonym for &, the bitwise and operator. TC++PL C.3.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

bitfield

A

a number of bits in a word made accessible as a struct member. TC++PL C.8.1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

bitor

A

synonym for |, the bitwise or operator TC++PL C.3.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

bitset

A

a standard library almost container holding N bits and providing logical operations on those. TC++PL 17.5.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

block

A

see compound statement. See also: try–block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

block comment

A

comment started by /* and terminated by */. TC++PL 6.4, D&E 3.11.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

bool

A

the built–in Boolean type. A bool can have the values true and false. TC++PL 4.2, D&E 11.7.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

boost.org

A

a collection of people

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

bug

A

colloquial term for error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

built–in type

A

A type provided directly by C++, such as int, double, and char*. See also: integral types, floating–point type, pointer, reference. TC++PL 4.1.1, 5.1, 5.2, 5.5, D&E 4.4, 15.11.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

byte

A

a unit of memory that can hold a character of the C++ representation character set. The smallest unit of memory that can be directly addressed in C++. Usually, a byte is 8 bits. TC++PL 4.6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

C

A

programming language designed and originally implemented by Dennis Ritchie. C++ is based on C and maintains a high degree of compatibility with C. See also: K&R C, C89, C99, ANSI C. TC++PL B, D&E 3.12.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

C standard library

A

the library defined for C in the C standard. Inherited by C++. Most C standard library functions have safer and more convenient alternatived in the C++ standard library. See also: algorithm, container, stream I/O, string, locale.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

C++

A

a general–purpose programming language with a bias towards systems programming that supports procedural programming, data abstraction, object–oriented programming, and generic programming. C++ was designed and originally implemented by Bjarne Stroustrup. C++ is defined by ISO/IEC 14882

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

C++ standard

A

the definition of C++ provided by ISO. Available from ANSI; see my C++ page. TC++PL 1.4, B.1. D&E 6.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

C++/CLI

A

A set of Microsoft extensions to C++ for use with their .Net system. See FAQ comments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

C–style cast

A

dangerous form of explicit type conversion; prefer new–style cast if you must use explicit type conversion. TC++PL 6.2.7, D&E 14.3.5.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

C–style string

A

zero–terminated array of characters, supported by C standard library functions. A low–level and error–prone mechanism; where possible prefer strings. TC++PL 3.5.1, 20.3.7, 20.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

C/C++

A

(1) an abbreviation used when discussing similarities, differences, and compatibility issues of C and C++. (2) a mythical language referred to by people who cannot or do not want to recognize the magnitude of differences between the facilities offered by C and C++ or the significant differences in the programming styles supported by the two language. See also: multi–paradigm programming, object–oriented programming, generic programming, exception, template, user–defined type, C++ standard library.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

C/C++ compatibility

A

C++ was designed to be as compatible as possible to C, but no more. This basically means as compatible as can be without compromising C++’s level of type safety. You can download Appendix B of TC++PL,. Compatibility, which describes incompatibilities and differences in facilities offered by C and C++. TC++PL B. D&E 2.7, 3.12, 4.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

call–by–reference

A

declaring a function argument type to be a reference, thus passing a reference rather than a value to the called function. See Also: call–by–value. TC++PL 5.5, D&E 3.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

call–by–value

A

passing a copy of an argument to the called function. The semantics of function call is to pass a copy of an argument. The copy operation is defined by the argument type’s copy constructor. See Also: call–by–reference. TC++PL 7.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

cast

A

operator for explicit type conversion; most often best avoided. See also dynamic_cast, C–style cast, new–style cast. TC++PL 6.2.7, D&E 7.2, 14.2.2.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

catch

A

keyword used to introduce a catch–clause.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

catch(…)

A

catch every exception. TC++PL 14.3.2, D&E 16.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

catch–clause

A

a part of a try–block that handles exceptions of a specified type. Also called a handler or an exception handler. TC++PL 8.3.1, 14.3, D&E 16.3–4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

cerr

A

standard unbuffered ostream for error or diagnostic output. TC++PL 21.2.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

Cfront

A

the front–end of Bjarne Stroustrup’s original C++ compiler. D&E 3.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

char

A

character type; typically an 8–bit byte. See also: wchar_t. TC++PL 4.3, C.3.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

char*

A

pointer to a char or an array of char. Typically assumed to point to a C–style string. Prefer a standard library string over a C–style string when you can. TC++PL 2.3.3, 13.5.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

character set

A

a set of integer values with a mapping to character representations; for example, ASCII (ANSI13.4–1968) gives meaning to the values 0–127. ASCII is C++’s representation character set, the character set used to represent program source text. TC++PL C.3. D&E 6.5.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

character type

A

char, unsigned char, and signed char. These are three distinct types. See also: wchar_t. TC++PL 2.3.1, 4.3, C.3.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

cin

A

standard istream. TC++PL 3.6, 21.3.1 D&E 8.3.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

class

A

a user–defined type. A class can have member functions, member data, member constants, and member types. A class is thee primary mechanism for representing concepts in C++. See also: template class. TC++PL 2.5.2, 10, D&E 2.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

class hierarchy

A

a collection of classes organized into a directed acyclic graph (DAG) by derived/base relationships. TC++PL 2.6.2, 12, 15, D&E 1.1, 7.2, 8.2.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

class template/template class

A

class parameterized by types, values, or templates. The template arguments necessary to identify the class to be generated for the class template must be provided where a template class is used. For example vector v; generates a vector of ints from the vector template. See also template. TC++PL 13.2, D&E 15.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

clone

A

a function that makes a copy of an object; usually a clone function relies on run–time information (e.g. a virtual function call) to correctly copy an object given only a pointer or reference to a sub–object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

closure

A

object representing a context. C++ does not have general closures, but function objects can be efficiently used to hold specific parts of a context relevant to a computation. TC++PL 22.4.7, 18.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

code generator

A

the part of a compiler that takes the output from the front–end and generates code from it. See also: back–end, optimizer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

collection

A

a term sometimes used as a synonym for container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

Comeau C++

A

a family of ports of the EDG C++ front–end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

comment

A

block comment /* … */ or line comment // …

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

compiler

A

the part of a C++ implementation that produces object code from a translation unit. See also: front–end, back–end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

complex

A

standard library complex number template parameterized by scalar type. TC++PL 11.3, 22.5, D&E 3.6.1, 8.5, 15.10.2.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

compound statement

A

sequence of statements enclosed in curly braces: { … } See also: try–block. TC++PL 2.3, 6.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

concept

A

a C++ language construct, providing type chaecking for template arguments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

concrete type

A

a type without virtual functions, so that objects of the type can be allocated on the stack and manipulated directly (without a need to use pointers or references to allow the possibility for derived classes). Often, small self–contained classes. See also abstract class, vector, list, string, complex. TC++PL 25.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

const

A

attribute of a declaration that makes the entity to which it refers readonly. See also: const member function. TC++PL 5.4, D&E 3.8.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

const definition

A

declaration of a const including an initializer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
88
Q

const member function

A

member function declared not to modify the state of the object for which it is called. Can be called for const objects only. TC++PL 10.2.6, D&E 13.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q

constant

A

literal, object or value declared const, or enumerator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q

constant expression

A

expression of integral type that is evaluated at compile time. TC++PL C.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
91
Q

constraint/concept checking

A

rule that restricts the set of acceptable arguments for a template parameter. For example the argument must have + and

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
92
Q

constructor

A

member function with the same name as its class, used to initialize objects of its class. Often used to establish an invariant for the class. Often used to acquire resources. A constructor establishes a local environment in which member functions execute. See also: order of construction, destructor. TC++PL 10.2.3, D&E 2.11.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

const_cast

A

a type conversion operation that conversion between types that differ in const and volatile type modifiers only. See also: cast. TC++PL 15.4.2.1, D&E 14.3.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
94
Q

container

A

(1) object that holds other objects. (2) type of object that holds other objects. (3) template that generates types of objects that hold other objects. (4) standard library template such as vector, list, and map. TC++PL 16.2, 16.2.3, 17, D&E 15.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
95
Q

controlled variable

A

a variable used to express the part of the exit condition of a loop that varies each time around the loop. For example ``i’’ in for (int i=0; i<max></max>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

conversion

A

explicit type conversion or implicit type conversion. See also: user–defined type conversion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
97
Q

conversion operator

A

operator function specifying a conversion from a user–defined type to either another user–defined type or a built–in type. Note that constructors cannot define conversions to built–in types. TC++PL 11.4, D&E 3.6.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
98
Q

copy assignment

A

an assignment accepting an object of the class itself as its argument, typically Z::operator=(const Z&). A copy assignment is used for assignment of an object of type T with an object of type T. If a copy assignment is not declared for a class, memberwise copy is used. See also: copy constructor. TC++PL 10.4.4.1, 10.4.6.3 D&E 11.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

copy constructor

A

a constructor accepting an object of the class itself as its argument, typically Z::Z(const Z&). A copy constructor is used for initialization of objects of type T with objects of type T. If a copy constructor is not declared for a class, memberwise initialization is used. See also: call–by–value, argument passing, value return, copy assignment. TC++PL 10.4.4.1, 10.4.6.3, D&E 11.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
100
Q

copy()

A

standard algorithm for copying one sequence into another. The two sequences need not be of the same type. TC++PL 18.6.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
101
Q

copying class object

A

an object of a class is copied by the class’ copy assignment and copy constructors. The default meaning of these operations is memberwise copy. TC++PL 10.4.4.1, 10.4.6.3 D&E 11.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
102
Q

cout

A

standard ostream. TC++PL 3.4, 21.2.1, D&E 8.3.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
103
Q

cpp

A

see preprocessor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
104
Q

crosscast

A

a cast from a class to a sibling class. See also: dynamic_cast, upcast, downcast. TC++PL 15.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
105
Q

Currying

A

producing a function of N–M arguments by specifying M arguments for a function of N arguments. See also: binder, default argument. TC++PL 18.4.4.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
106
Q

data abstraction

A

programming relying on user–defined types with well–defined interfaces. See also: generic programming and object–oriented programming. TC++PL 2.5, 24.2.2, D&E 9.2.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
107
Q

data member

A

member of a class that can hold a value. A memer can be a static member or a non–static member. TC++PL 2.5.2–3, 10.2, D&E 2.3, 2.5.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
108
Q

declaration

A

an introduction of a name into a scope. The type of the name must be specified. If the declaration also specifies the entity to which the name refers, the declaration is also a definition. TC++PL 4.9, D&E 3.11.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
109
Q

decltype

A

C++ox operator meaning the type of its operand. For example: const double& d1 =2.0; decltype(d1) d2; (d2 will also be a const double&). Primarily useful for writing forwarding functions in generic programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
110
Q

default argument

A

a value specified for an argument in a function declaration, to be used if a call of the function doesn’t specify a value for that argument. This is commonly used to allow a simple interface for common uses while making it easy to use less common facilities by specifying more arguments. See also: default template argument, binder. TC++PL 7.5, 10.2.3, D&E 2.12.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
111
Q

default constructor

A

constructor requiring no arguments. Used for default initialization. TC++PL 10.4.2, 10.4.6, D&E 2.12.2, 15.11.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
112
Q

default template argument

A

a type or value specified for an argument in a template declaration, to be used if a use of the template doesn’t provide a type or value for that argument. This is commonly used to allow a simple interface for common uses while making it easy to use less common facilities by specifying more arguments. See also: default argument. TC++PL 13.4.1, B.3.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
113
Q

default value

A

value defined by a default constructor. For built–in types, the default value is defined to be 0. TC++PL 4.9.5, 10.3.1, 10.4.2 D&E 15.11.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
114
Q

definition

A

a declaration that specifies the entity to which the declared name refers. See also: one definition rule, variable definition, const definition, template definition, function definition. TC++PL 4.9, D&E 15.11.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
115
Q

delayed evaluation

A

technique for eliminating temporary values, and in general to delay a computation until sufficient information is available to do it well. TC++PL 21.4.6.3, 22.4.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

delete

A

object destruction operator. Invokes destructor, if any. See also: resource management, memory management, garbage collection, operator delete(). TC++PL 6.2.6, D&E 2.3, 10.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
117
Q

deprecated feature

A

feature left in a programming language for historical reasons only. The standard s committee recommends against its use and warns that it may be removed in future revisions of the standard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
118
Q

deque

A

double–ended queue (pronounced deck). A standard library template allowing insertions and deletions at both ends. Use a vector if you need insertions and deletions only at one end (as is typical). Use a list if you need frequent insertions and deletions in the middle. TC++PL 17.2.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
119
Q

derived class

A

a class with one or more base classes TC++PL 2.6.2, 12, 15, D&E 3.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
120
Q

design

A

creating a clean and reasonably simple structure of a system TC++PL 23.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
121
Q

destructor

A

member of a class used to clean up before deleting an object. It’s name is its class’ name prefixed by ‘~’. For example, Foo’s destructor is ~Foo(). Often used to release resources. A destructor is implicitly called whenever an object goes out of scope or is deleted. See also: virtual destructor, order of destruction. TC++PL 10.4.2, D&E 2.11.1, 3.11.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
122
Q

digraph

A

alternative representation for C++ representation characters that doesn’t exist in every national character set, such as {, }, [,], and #: , and %:. TC++PL C.3.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
123
Q

double

A

double–precision floating–point number. TC++PL 4.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
124
Q

double dispatch

A

a technique for selecting a function to be invoked on the dynamic type of two operands. TC++PL 21.2.3.1, D&E 13.8.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
125
Q

downcast

A

a cast from a base class to one of its derived classes. The name reflects the fact that in programming, trees tend to be drawn growing downwards from the roots. See also: dynamic_cast, upcast, crosscast. TC++PL 15.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
126
Q

dynamic type

A

the type of an object as determined at run–time; e.g. using dynamic_cast or typeid. Also known as most–derived type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
127
Q

dynamic type safety

A

type safety enforced at run time (typically requiring a programmer to catch exceptions to deal with violations). An example is range checking for vectors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
128
Q

dynamic_cast

A

a type conversion operation that performs safe conversions using on run time type information. Used for navigation of a class hierarchy. See also: downcast, crosscast, static_cast. TC++PL 15.4.1, D&E 14.2.2, 14.3.2.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
129
Q

EDG C++ front–end

A

a quality C++ compiler front–end, which is the core of several well–regarded C++ compilers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
130
Q

element

A

an object in a container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
131
Q

encapsulation

A

the enforcement of abstraction by mechanisms that prevent access to implementation details of an object or a group of objects except through a well–defined interface. C++ enforces encapsulation of private and proteced members of a class as long as users do not violate the type system using casts. See also: interface and access control. TC++PL 15.3, 24.3.7.4, D&E 2.10.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
132
Q

enum

A

keyword for declaring enumerations. TC++PL 4.8, D&E 11.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
133
Q

enumeration

A

a user–defined type consisting of a set of named values. TC++PL 4.8, D&E 11.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
134
Q

enumerator

A

a name identifying a value of an enumeration. TC++PL 4.8, D&E 11.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
135
Q

escape character/backslash

A

the character \, also called backslash, sed an initial character in representations of characters that cannot be represented by a single ASCII character, such as newline (‘\n’) and horizontal tab (‘\t’). TC++PL C.3.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
136
Q

exception

A

object thrown by a throw–statement and (potentially) caught by an exception handler associated by a try–block. See also: exception safety, termination semantics, catch. TC++PL 8.3, 14.2, D&E 16.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
137
Q

exception handler

A

a catch–clause associated with a try–block for handling exceptions of a specified type. TC++PL 8.3.1, 14.3, D&E 16.3–4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
138
Q

exception handling/error handling

A

the primary way of reporting an error that cannot be handled locally. An exception is thrown and will be caught by an exception handler or terminate() will be called. See also: exception safety, termination semantics, try–block, throw, catch. TC++PL 8.3, 14, E, D&E 16.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
139
Q

exception safety

A

the notion that a program is structured so that throwing an exception doesn’t cause unintended side effects. See also: basic guarantee, strong guarantee, and nothrow guarantee. You can download Appendix E Standard–Library Exception Safety of TC++PL describing techniques for exception handling. TC++PL E.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
140
Q

executable file

A

the result of linking the object files of a complete program. See also: compiler, linker.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
141
Q

explicit

A

keyword used to define a constructor so that it isn’t used for implicit conversions. TC++PL 11.7.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
142
Q

explicit call of constructor

A

See placement new.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
143
Q

explicit call of destructor

A

destructors are implicitly called when an object goes out of scope or is deleted. However, if a user have taken over construction (using placement new) and destruction, a destructor must be explicitly called. Example. For example, explicit call of destructor is used in the implementation of standard library containers. See also: placement new. TC++PL 10.4.11, E.3.1, D&E 10.5.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
144
Q

explicit constructor

A

constructor so that will not be used for implicit conversions. TC++PL 11.7.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
145
Q

explicit instantiation

A

explicit request to instantiate a template in a specific context. See also: template instantiation. TC++PL C.13.10, D&E 15.10.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
146
Q

explicit qualification

A

(1) by namespace name, see qualified name. (2) by template argument. TCP++L 13.3.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
147
Q

explicit type conversion

A

type conversion (explicitly) requested by the use of a C–style cast, new–style cast, or functional notation. See also, implicit type conversion, user–defined type conversion. TC++PL 6.2.7, D&E 14.3.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
148
Q

expression

A

combination of operators and names producing a value. TC++PL 6.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
149
Q

extended type information

A

any scheme that provides additional information base on the standard run time type information. TC++PL 15.4.4.1, D&E 14.2.5.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
150
Q

extension

A

see language extension

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
151
Q

extern

A

a keyword used to indicate that the definition of an entity being declared is defined elsewhere. Because extern: is only necessary for global variables it is largely redundant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
152
Q

extracter

A

an iostream >> (put to) function. TC++PL 21.2,21.3, D&E 8.3.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
153
Q

facet

A

a class representing a primitive aspect of a locale, such as a way of writing an integer or a character encoding. TC++PL D.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
154
Q

FALSE

A

bool value; converts to 0. TC++PL 4.2, D&E 11.7.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
155
Q

fat interface

A

an interface with more member functions and friends than are logically necessary. TC++PL 24.4.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
156
Q

field

A

see bitfield.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
157
Q

file

A

a sequence of bytes or words holding information in a computer. The term file is usually reserved to information placed on disk or elsewhere outside the main memory. The iostream part of the C++ standard library provides ifstream, ofstream, and fstream as abstraction for accessing files. TC++PL 21.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
158
Q

file stream

A

stream attached to a file. See also, fstream, ifstream, ofstream. TC++PL 21.5.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
159
Q

finally

A

a language construct supporting ad hoc cleanup in some languages. Similar, but not identical to C++’s catch(…). Use the resource acquisition is initialization technique instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
160
Q

find()

A

standard library linear search algorithm for a value in a sequence. TC++PL 18.5.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
161
Q

find_if()

A

standard library linear search algorithm for an element meeting a search criterion in a sequence. TC++PL 18.5.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
162
Q

float

A

single–precision floating–point number. TC++PL 4.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
163
Q

floating–point literal

A

the source text representation of a floating point value. For example, 0.314e1. TC++PL 4.5.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
164
Q

floating–point type

A

a float, double, or long double. A floating–point number is typically represented as a mantissa and an exponent. TC++PL 4.5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
165
Q

for–statement

A

iteration statement specifying an initializer, an iteration condition, a next–iteration operation, and a controlled statement. TC++PL 6.3.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
166
Q

free store/dynamic memory

A

memory allocated by new; also called dynamic memory. Often standard library facilities, such as vector, can be used to avoid explicit use of free store. TC++PL 6.2.6, 10.4.3, D&E 2.11.2, 11.4.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
167
Q

free()

A

C standard deallocation function. Use delete instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
168
Q

free–standing function

A

a function that is not a member function. Useful for decreasing coupling between representation and algorithm. TC++PL 7, 18.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
169
Q

friend

A

a function or class explicitly granted access to members of a class by that class. TC++PL 11.5, C.11.4, D&E 2.10, 3.6.1–2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
170
Q

friend function

A

a function declared as friend in a class so that it has the same access as the class’ members without having to be within the scope of the class. And, no, friends do not violate encapsulation. TC++PL 11.5, 11.2.3, C.11.4, D&E 2.10, 3.6.1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
171
Q

front–end

A

the parts of a compiler that perform lexical and syntax checking, type checking, and initial semantic checking of a translation unit. Typically all compiler error messages comes from the front–end. See also: back–end. D&E 3.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
172
Q

front_inserter()

A

returns an iterator that can be used to add elements at the front of the container . TC++PL 19.2.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
173
Q

fstream

A

a file stream for input and output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
174
Q

function

A

a named sequence of statements that can be invoked/called given arguments and that might return a value. The type of the function includes the number and types of argument and the type of the value returned, if any. See also: function declaration, function body. TC++PL 2.3, 7, D&E 2.6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
175
Q

function argument

A

an argument to a function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
176
Q

function body

A

the outermost block of a function. See also: try–block, function definition. TC++PL 2.7, 13.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
177
Q

function declaration

A

declaration of a function, including its name, argument types, and return type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
178
Q

function definition

A

function declaration including a function body.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
179
Q

function parameter

A

a parameter of a function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
180
Q

function prototype

A

C term for a function declaration that isn’t also a function definition. D&E 2.6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
181
Q

function template

A

function parameterized by types, values, or templates. The function to be generated from a template function can usually be deduced from the function arguments in a call. For example, sort(b,e) generates sort(b,e) from the sort() template function if b and e are standard library vector iterators. If a template argument cannot be deduced, it must be provided through explicit qualification. See also template. TC++PL 13,3, D&E 15.6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
182
Q

function try–block

A

try–block associated with the outmost block of a function, the function body. TC++PL 3.7.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
183
Q

functor/function object

A

object with the application operator, operator()(), defined so that it can be called like a function. A function object is more general than a function because it can hold data and provide additional operations. Sometimes called a functor. Given current compiler technology, simple function objects inline better than pointers to functions, so that parameterization with function objects can be far more efficient than use of pointers to functions or virtual functions. See also: binder, adapter, inlining. Example. TC++PL 18.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
184
Q

G++

A

see GNU C++.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
185
Q

garbage collection/automatic garbage collection

A

techniques for reclaiming unused memory without relying on user–supplied delete or free() commands. A permitted but not required technique for C++. Commercial and free garbage collectors exist for C++: See my C++ page. Use of classes that control their own storage, such as the standard library vector, string, and map, reduces the need for garbage collection. See also: resource acquisition is initialization, destructor. TC++PL C.9.1. D&E 10.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
186
Q

general–purpose programming language

A

(1) a programming language intended for use in a wide range of application areas without restrictions that make it totally unsuitable for traditional major uses of computers, such as mathematical computations, data processing, text processing, graphics, and communications. (2) a language that can do what at least as much as other languages called general purpose can do. See also: C++.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
187
Q

generic programming

A

programming using templates to express algorithms and data structures parameterized by data types, operations, and polices. See also: polymorphism, multi–paradigm programming. TC++PL 2.7, 24.4.1, D&E 15.11.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
188
Q

get function

A

see >>.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
189
Q

global data

A

data defined in the global scope. This is usually best avoided because a programmer can’t easily know what code manipulates it and how. It is therefore a common source of errors. Global constants are usually ok.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
190
Q

global scope

A

the scope containing all names defined outside any function, class, or namespace. Names in the global scope can be prefixed by ::. For example, ::main(). TC++PL 2.9.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
191
Q

glossary

A

collection of glosses; lists and explanations of special words.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
192
Q

goto

A

the infamous goto. Primarily useful in machine generated C++ code. TC++PL 6.3.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
193
Q

grammar

A

a systematic description of the syntax of a language. The C++ grammar is large and rather messy. Some of the syntactic complexity was inherited from C. TC++PL A, D&E 2.8.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
194
Q

handle

A

an object that controls access to another. Often, a handle also controls the acquisition and release of resources. A common use is for a handle to control access to a variably–sized data structure. See also: resource acquisition is initialization, vector, string, smart pointer. TC++PL 25.7, D&E 11.5.2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
195
Q

handle class

A

a small class that provides interface to an object of another class. A handle is the standard way of providing variable sized data structures in C++. Examples are string and vector. TC++PL 25.7.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
196
Q

handler

A

see exception handler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
197
Q

hash_map

A

hashed contained based on the standard library framework. Not (yet) part of the standard but very common in libraries based on the standard library. See also: map, vector, list. TC++PL 17.6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
198
Q

header file/.h

A

file holding declarations used in more than one translation unit. Thus, a header file acts as an interface between separately compiled parts of a program. A header file often contains inline function definitions, const definitions, enumerations, and template definitions, but it cannot be #included from for than one source file if it contain non–inline function definitions or variable definitions. TC++PL 2.4.1, 9.2.1. D&E 2.5, 11.3.3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
199
Q

higher–order function

A

functions that produce other functions. C++ does not have general higher–order functions, but by returning function objects a function can efficiently emulate some techniques traditionally relying of higher–order functions. See also: binder. TC++PL 18.4.4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
200
Q

history of C++

A

The work on what became C++ started by Bjarne Stroustrup in AT&T Bell Labs in 1979. The first commercial release was in 1985. Standards work stared in 1990 leading to ratification of the ISO standard in 1998. TC++PL 1.4. D&E Part 1.

201
Q

Hungarian notation

A

a coding convention that encodes type information in variable names. Its main use is to compensate for lack of type checking in weakly–typed or untyped languages. It is totally unsutable for C++ where it complicates maintenance and gets in the way of abstraction.

202
Q

hybrid language

A

derogative term for a programming language that supports more programming styles (paradigms) rather than just object–oriented programming.

203
Q

I/O

A

see iostream

204
Q

IDE

A

Integrated (or Interactive) Development Enviornment. A software development environment (SDE) emphasizing a GUI interface centered around a source code editor. There are many IDEs for C++, but no standard SDE.

205
Q

identifier

A

see name.

206
Q

if–statement

A

statement selecting between two alternatives based on a condition. TC++PL 6.3.2.

207
Q

ifstream

A

an file stream for input.

208
Q

implementation defined

A

an aspect of C++’s semantics that is defined for each implementation rather than specified in the standard for every implementation. An example is the size of an int (which must be at least 16 bits but can be longer). Avoid implementation defined behavior whenever possible. See also: undefined. TC++PL C.2.

209
Q

implementation inheritance

A

see private base.

210
Q

implicit type conversion

A

conversion applied implicitly based on an expected type and the type of a value. See also, explicit type conversion, user–defined type conversion. TC++PL 11.3.3, 11.3.5, 11.4, C.6, D&E 2.6.2, 3.6.1, 3.6.3, 11.2.

211
Q

in–class

A

lexically within the declaration of a class. TC++PL 10.2.9, 10.4.6.2.

212
Q

include

A

see #include.

213
Q

incomplete type

A

type that allows an object to be copied, but not otherwise used. A pointer to an undeclared type is the typical example of an incomplete type.

214
Q

inequality operator

A

see !=.

215
Q

infix operator

A

a binary operator where the operator appears between the operands. For example, a+b.

216
Q

information hiding/data hiding

A

placing information where it can be accessed only through a well–defined interface. See also: access control, abstract class, separate compilation. TC++PL 2.4.

217
Q

inheritance

A

a derived class is said to inherit the members of its base classes. TC++PL 2.6.2, 12.2, 23.4.3.1, D&E 3.5, 7.2, 12.

218
Q

initialization

A

giving an object an initial value. Initialization differs from assignment in that there is no previous value involved. Initialization is done by constructors.

219
Q

initializer list

A

comma–separated list of expressions enclosed in curly braces, e.g. { 1, 2, 3 } used to initialize a struct or an array. TC++PL 5.2.1, 5.7, 11.3.3.

220
Q

inline function

A

function declared inline using the inline keyword or by being a member function defined in–class. Compilers are encouraged to generate inline code rather than function calls for inline functions. Most benefits from inlining comes with very short functions. TC++PL 7.1.1, 9.2, 10.2.9, D&E 2.4.1 .

221
Q

inlining

A

see inline function.

222
Q

input

A

see iostream.

223
Q

inserter

A

(1) an iostream << (put to) function. (2) an STL operation yielding an iterator to be used for adding elements to a containter. TC++PL 19.2.4, 21.2, D&E 8.3.1. See also: extracter, back_inserter, front_inserter.

224
Q

instantiation

A

see template instantiation.

225
Q

int

A

basic signed integer type; its precision is implementation–defined, but an int has at least 32 bits. TC++PL 2.3.1, 4.4.

226
Q

integer type

A

a short, int, or long. Standard C++ doesn’t support long long. TC++PL 4.4.

227
Q

integral type

A

a bool, character type, or integer type. Supports arithmetic and logical operations. TC++PL 4.1.1.

228
Q

interface

A

a set of declarations that defines how a part of a program can be accessed. The public members and the friends of a class defines that class’ interface for other code to use. A class without data members defines a pure interface. The protected members provide an additional interface for use by members of derived classes. See also: abstract class.

229
Q

interface function

A

A function that can access the representation of a class. See also: friend, member function, derived class, protected.

230
Q

interface inheritance

A

see abstract class, public base.

231
Q

invariant

A

a condition of the representation of an object (the object’s state) that should hold each time an interface function is called; usually established by a constructor TC++PL 24.3.7, E.3.5.

232
Q

iostream

A

(1) standard library flexible, extensible, type–safe input and output framework. (1) stream that can be used for both input and output. See also: file stream, string stream. TC++PL 3.4, 3.6, 21, D&E 3.11.4.1, 8.3.1.

233
Q

istream

A

input stream type. TC++PL 3.6, 21.3.

234
Q

istringstream

A

a string stream for input.

235
Q

iteration

A

traversal of data structure, directly or indirectly using an iteration–statement. See also: recursion. The standard library offer algorithms, such as copy() and find(), that can be effective alternatives to explicit iteration. TC++PL 6.3.3. 18.

236
Q

iteration–statement

A

for–statement, while–statement, or do–statement.

237
Q

iterator

A

a standard library abstraction for objects referring to elements of a sequence. TC++PL 3.8.1, 19.2–3.

238
Q

Koenig lookup

A

see argument–based lookup.

239
Q

language extension

A

(1) relatively new feature that people haven’t yet gotten used to. (2) proposed new feature. (3) feature provided by one or more implementations, but not adopted by the standard; the use of some such features implies lock–in to a particular compiler supplier.

240
Q

learning C++

A

focus on concepts and techniques. You don’t need to learn C first. See also Learning Standard C++ as a New Language, available from my papers page. How do I start?. TC++PL 1.2,1.7, D&E 7.2.

241
Q

line comment

A

comment started by // and terminated by end–of–line. TC++PL 6.4, D&E 3.11.1.

242
Q

linkage

A

the process of merging code from separately compiled translation units into a program or part of a program. TC++PL 9.

243
Q

linker

A

the part of a C++ implementation that merge the code generated from separately compiled translation units into a program or part of a program. TC++PL 9.1, D&E 4.5, 11.3.

244
Q

Liskov Substitution Principle

A

design classes so that any derived class will be acceptable where its base class is. C++ public bases enforce that as far as the interface provided by the base class. TC++PL 24.3.4, D&E 2.10.

245
Q

list

A

standard library linked container. See also: vector, map. TC++PL 3.7.3, 17.2.2.

246
Q

literal

A

notation for values of bool, character types, integer types, or floating–point types. See also: enumerators. TC++PL 4.2, 4.3.1, 4.4.1, 4.5.1, 5.2.2, D&E 11.2.1.

247
Q

local class

A

class defined within a function. Most often, the use of a local class is a sign that a function is too large. Beware that a local class cannot be a valid template argument.

248
Q

local function

A

function defined within a function. Not supported by C++. Most often, the use of a local function is a sign that a function is too large.

249
Q

locale

A

standard library class for representing culture dependencies relating to input and output, such as floating–point output formats, character sets, and collating rules. A locale is a container of facets. TC++PL 21.1, D.

250
Q

long double

A

extended–precision floating–point number. TC++PL 4.5.

251
Q

long int

A

integer of a size greater than or equal to the size of an int. TC++PL 4.4.

252
Q

loop

A

a statement that expresses the notion of doing something zero or more times, such as a for–statement and a while–statement.

253
Q

LSP

A

see Liskov Substitution Principle.

254
Q

lvalue

A

an expression that may appear on the left–hand side of an assignment; for example, v[7] if v is an array or a vector. An lvalue is modifiable unless it is const. TC++PL 4.9.6, D&E 3.7.1.

255
Q

macro

A

facility for character substitution; doesn’t obey C++ scope or type rules. C++ provides alternatives to most uses of macros; see template, inline, const, and namespace. Don’t use macros unless you absolutely have to. TC++PL 7.8, D&E 2.9.2, 4.4, 18.

256
Q

main()

A

the function called by the system to start a C++ program. TC++PL 3.2, 6.1.7, 9.4 .

257
Q

maintenance

A

work on a program after its initial release. Typical maintenance activities include bug fixing, minor feature enhancements, porting to new systems, improvements of error handling, modification to use different natural languages, improvements to documentation, and performance tuning. Maintenance typically consumes more than 80% of the total effort and cost expended on a program.

258
Q

malloc()

A

C standard allocation function. Use new or vector instead.

259
Q

map

A

standard library associative container, based on less than ordering. See also: hash_map, vector, list. TC++PL 3.7.4, 17.4.1.

260
Q

Max Munch

A

(1) mythical participant in the C++ standards process. (2) the rule that says that while parsing C++ always chooses the lexically or syntactically longest alternative. Thus ++ is the increment operation, not two additions, and long int is a single integer type rather than the long integer followed by an int. Cross references in this glossary follow this rule.

261
Q

member

A

type, variable, constant, or function declared in the scope of a class. TC++PL 5.7, 10.2, D&E 2.3, 2.5.2, 2.11.

262
Q

member class

A

a class that is a member of another; also called a nested class. TC++PL 11.12, D&E 3.12, 13.5.

263
Q

member constant

A

const or enumeration declared as a member. If initialized in–class, such a constant can be used in constant expressions within the class. TC++PL 10.4.6.2.

264
Q

member data

A

see data member.

265
Q

member function

A

a function declared in the scope of a class. A member function that is not a static member function must be called for an object of its class. TC++PL 10.2.1, D&E 2.3, 3.5.

266
Q

member initializer

A

initializer for a member specified in the constructor for its class. TC++PL 10.4.6, 12.2.2, D&E 12.9.

267
Q

member type

A

member class, member enumeration, or member typedef.

268
Q

memberwise copy

A

copying a class object by copying each of its members in turn, using proper copy constructors or copy assignments. That’s the default meaning of copy. TC++PL 10.4.4.1, 10.4.6.3, D&E 11.4.4.

269
Q

memory

A

static memory, stack, or free store.

270
Q

memory management

A

a way of allocating and freeing memory. In C++ memory is either static, allocated on the stack, or allocated on the free store. When people talk about memory management, they usually think of free store or even specifically about garbage collection. Memory can often be effectively managed through standard library containers, such as vector or string, or through general resource management techniques. See also: auto_ptr, constructor, destructor, resource acquisition is initialization. TC++PL C.9, D&E 3.9, 10.

271
Q

mem_fun()

A

an adapter that allows a member function to be used as an argument to a standard algorithm requiring a free–standing function. TC++PL 18.4.4.2.

272
Q

method

A

see virtual member function.

273
Q

modifiable lvalue

A

lvalue that is not const. TC++PL 4.9.6.

274
Q

most–derived type

A

the type used to create an object (before any conversions). See also: dynamic type, static type.

275
Q

multi–method

A

a virtual function that selects the function to be called based on more than one operand. See also: multiple dispatch. D&E 13.8.

276
Q

multi–paradigm design

A

design focussed on applying the various paradigms to their best advantage. See also: multi–paradigm programming.

277
Q

multi–paradigm programming

A

programming applying different styles of programming, such as object–oriented programming and generic programming where they are most appropriate. In particular, programming using combinations of different programming styles (paradigms) to express code more clearly than is possible using only one style. See also: C++.

278
Q

multimap

A

map that allows multiple values for a key. TC++PL 17.4.2.

279
Q

multiple dispatch

A

the generalization of double dispatch to more operands. See also: single dispatch.

280
Q

multiple inheritance

A

the use of more than one immediate base class for a derived class. One typical use is to have one base define an interface and another providing help for the implementation. TC++PL 12.2.4, 12.4, 15.2.5, D&E 12.

281
Q

mutable

A

an attribute of a member that makes it possible to change its value even if its object is declared to be const TC++PL 10.2.7.2, D&E 13.3.3.

282
Q

namespace

A

a named scope. TC++PL 2.5.1, 8.1, C.10. D&E 17.

283
Q

namespace alias

A

alternative name for a namespace; often a shorter name. TC++PL 8.2.7, D&E 17.4.3.

284
Q

nested function

A

see local function.

285
Q

new

A

object creation operator. See also: constructor, placement new, operator new(), resource management, memory management, garbage collection. TC++PL 6.2.6, 19.4.5, D&E 2.3, 10.2.

286
Q

new–style cast

A

dynamic_cast, static_cast, const_cast, or reinterpret_cast. D&E 14.3.

287
Q

new_handler

A

a (possibly user–defined) function called by new if operator new() fails to allocate sufficient memory. See also: std::bad_alloc exception. TC++PL 6.2.6.2, 14.4.5., 19.4.5.

288
Q

non–static member

A

member of a class that is not declared to be a static member. An object of a class has its own space for each non–static data member.

289
Q

not

A

synonym for !, the logical negation operator TC++PL C.3.1.

290
Q

nothrow guarantee

A

the guarantee that an operation will not throw an exception. See also exception safety, basic guarantee, and strong guarantee. TC++PL E.2.

291
Q

NULL

A

zero. 0. 0 is an integer. 0 can be implicitly converted to every pointer type. See also: nullptr. TC++PL 5.1.1, D&E 11.2.3.

292
Q

nullptr

A

C++0x keyword for the null pointer. It is not an integer. It can be assigned only to pointers.

293
Q

object

A

(1) a contiguous region of memory holding a value of some type. (2) a named or unnamed variable of some type; an object of a type with a constructor is not considered an object before the constructor has completed and is no longer considered an object once a destructor has started executing for it. Objects can be allocated in static memory, on the stack, on on the free store. TC++PL 4.9.6, 10.4, 10.4.3, D&E 2.3, 3.9.

294
Q

object code

A

see object file.

295
Q

object file

A

the result of compiling a source file. See also: compiler.

296
Q

object–oriented design

A

design focussed on objects and object–oriented programming. TC++PL 23.2, D&E 7.2.

297
Q

object–oriented programming

A

programming using class hierarchies and virtual functions to allow manipulation of objects of a variety of types through well–defined interfaces and allow a program to be extended incrementally through derivation. See also: polymorphism, data abstraction. TC++PL 2.6, 12, D&E 3.5, 7.2.

298
Q

object–oriented programming language

A

a programming language designed to support or enforce some notion of object–oriented programming. C++ supports OOP and other effective forms of programming, but does not try to enforce a single style of programming. See also: generic programming, multi–paradigm programming, hybrid language.

299
Q

ODR

A

see one definition rule

300
Q

ofstream

A

an file stream for output.

301
Q

old–style cast

A

see C–style cast.

302
Q

one definition rule

A

there must be exactly one definition of each entity in a program. If more than one definition appears, say because of replication through header files, the meaning of all such duplicates must be identical. TC++PL 9.2.3, D&E 2.5, 15.10.2.

303
Q

operator

A

conventional notation for built–in operation, such as +, *, and &. A programmer can define meanings for operators for user–defined types. See also: operator overloading, unary operator, binary operator, ternary operator, prefix operator, postfix operator. TC++PL 6.2.

304
Q

operator delete()

A

deallocation function used by delete#. Possibly defined by user. TC++PL 6.2.6.2, 19.4.5. See also: operator new().

305
Q

operator delete

A

deallocation function used by delete#. Possibly defined by user. TC++PL 6.2.6.2, 19.4.5. See also: operator new.

306
Q

operator function

A

function defining one of the standard operators; e.g. operator+(). See also: operator, operator overloading, conversion operator.

307
Q

operator new()

A

allocation function used by new. Possibly defined by user. TC++PL 6.2.6.2, 19.4.5. See also: operator delete().

308
Q

operator new

A

allocation function used by new. Possibly defined by user. TC++PL 6.2.6.2, 19.4.5. See also: operator delete.

309
Q

operator overloading

A

having more than one operator with the same name in the same scope. Built–in operators, such as + and *, are overloaded for types such as int and float. Users can define their own additional meanings for user–defined types. It is not possible to define new operators or to give new meanings to operators for built–in types. The compiler picks the operator to be used based on argument types based overload resolution rules. See also: overload resolution. TC++PL 6.2, D&E 3.6, 11.7.1.

310
Q

optimizer

A

a part of a compiler that eliminates redundant operations from code and adjusts code to perform better on a given computer. See also, front–end, back–end, code generator. D&E 3.3.3.

311
Q

or

A

synonym for ||, the logical or operator TC++PL C.3.1.

312
Q

order of construction

A

a class object is constructed from the bottom up: first bases in declaration order, then members in declaration order, and finally the body of the constructor itself. TC++PL 10.4.6, 12.2.2, 15.2.4.1, 15.4.3. D&E 2.11.1, 13.2.4.2.

313
Q

order of destruction

A

a class object is destroyed in the reverse order of construction. See also: destructor.

314
Q

ostream

A

output stream type. TC++PL 3.4, 21.2.

315
Q

ostringstream

A

a string stream for output.

316
Q

output

A

see iostream.

317
Q

out_of_range

A

standard exception thrown by vector if an argument to at() is out of range. TC++PL 16.3.3.

318
Q

overload

A

see overloading.

319
Q

overload resolution

A

a set of rules for selecting the best version of an operator based on the types of its operands. A set of rules for selecting the best version of an overloaded function based on the types of its arguments. The intent of the overload resolution rules is to reject ambiguous uses and to select the simplest function or operator for each use. TC++PL 6.2, D&E 11.2.

320
Q

overloaded function

A

see overloading.

321
Q

overloaded operator

A

see operator overloading

322
Q

overloading

A

having more than one function with the same name in the same scope or having more than one operator with the same name in the same scope. It is not possible to overload across different scopes. See also: using–declaration. TC++PL 6.2, D&E 3.6, 11.2.

323
Q

override

A

see overriding.

324
Q

overriding

A

declaring a function in a derived class with the same name and a matching type as a virtual function in a base class. The argument types must match exactly. The return types must match exactly or be co–variant. The overriding function will be invoked when the virtual function is called. TC++PL 15.6.2, 6.2, D&E 3.5.2–3, 13.7.

325
Q

paradigm

A

pretentious and overused term for a way of thinking. Often used with the erroneous assumption that paradigms are mutually exclusive, and often assuming that one paradigm is inherently superior to all others. Derived from Kuhn’s theory of science. TC++PL 2.2.

326
Q

parameter

A

a variable declared in a function or templates for representing an argument. Also called a formal argument. Similarly, for templates.

327
Q

partial specialization

A

a template used (only) for the subset of its template parameters that matches a specialization pattern. TC++PL 13.5.

328
Q

Performance TR

A

technical report from the ISO C++ standards committee discussing issues related to perfoemance, especially as concerns embedded systems programming and hardware access. See my C++ page.

329
Q

placement delete

A

See explicit call of destructor.

330
Q

placement new

A

a version of the new operator where the user can add arguments to guide allocation. The simplest form, where the object is placed in a specific location, is supported by the standard library. Example. For example, placement new is used in the implementation of standard library containers. See also: explicit call of destructor. TC++PL 10.4.11, E.3.1, D&E 10.4.

331
Q

POD

A

Plain Old Data

332
Q

pointer

A

an object holding an address or 0. TC++PL 2.3.3, 5.1, D&E 9.2.2.1, 11.4.4.

333
Q

policy object

A

an object used to specify guide decisions (e.g. the meaning of less than) or implementation details (e.g. how to access memory) for an object or an algorithm. See also trait, facet. TC++PL 13.4, 24.4.1.

334
Q

polymorphism

A

providing a single interface to entities of different types. virtual functions provide dynamic (run–time) polymorphism through an interface provided by a base class. Overloaded functions and templates provide static (compile–time) polymorphism. TC++PL 12.2.6, 13.6.1, D&E 2.9.

335
Q

postfix operator

A

a unary operator that appears after its operand. For example var++.

336
Q

prefix operator

A

a unary operato that appears before its operand. For example, &var.

337
Q

preprocessor

A

the part of a C++ implementation that removes comments, performs macro substitution and #includes. Avoid using the preprocessor whenever possible. See also: macro, #include, inline, const, template, namespace. TC++PL 7.8, 9.2.1, D&E 18.

338
Q

priority_queue

A

standard library queue where a priority determines the order in which an element reaches the head of the queue. TC++PL 17.3.3.

339
Q

private

A

access control keyword. See private member, private base.

340
Q

private base

A

a base class declared private in a derived class, so that the base’s public members are accessible only from that derived class. TC++PL 15.3.2, D&E 2.10.

341
Q

private member

A

a member accessible only from its own class. TC++PL 2.5.2, 10.2.2, 15.3, D&E 2.10.

342
Q

procedural programming

A

programming using procedures (functions) and data structures (structs). See also: data abstraction, object–oriented programming, generic programming, multi–paradigm programming. TC++PL 2.3.

343
Q

procedure

A

see function.

344
Q

program

A

a set of translation units complete enough to be made executable by a linker. TC++PL 9.4.

345
Q

programming language

A

artificial language for expressing concepts and general algorithms in a way that lends itself to solving problems using computers. There do not appear to be a general consensus on what a programming language is or should be. TC++PL 1.3.2, 2.1–2, D&E page 7.

346
Q

prohibiting operations

A

operations can be rendered inaccessible by declaring them private; in this way default operations, such as construction, destruction, and copying can be disallowed for a class. TC++PL 11.2.2, D&E 11.4.

347
Q

proprietary language

A

language owned by an organization that is not an official standards organization, such as ISO; usually manipulated by its owner for commercial advantage.

348
Q

protected

A

access control keyword. See protected member, protected base.

349
Q

protected base

A

a base class declared protected in a derived class, so that the base’s public and protected members are accessible only in that derived class and classes derived from that. TC++PL 15.3.2, D&E 13.9.

350
Q

protected member

A

a member accessible only from classes derived from its class. TC++PL 15.3.1, D&E 13.9.

351
Q

protection

A

see encapsulation.

352
Q

protection model

A

the mechanisms for access control. See public, private, protected, friend. TC++PL 15.3, D&E 2.10.

353
Q

public

A

access control keyword. See public member, public base.

354
Q

public base

A

a base class declared public in a derived class, so that the base’s public members are accessible to the users of that derived class. TC++PL 15.3.2, D&E 2.3.

355
Q

public member

A

a member accessible to all users of a class. TC++PL 2.5.2, 10.2.2, 15.3, D&E 2.10.

356
Q

pure object–oriented language

A

programming language claiming to support only object–oriented programming. C++ is designed to support several programming paradigms, including traditional C–style programming, data abstraction, object–oriented programming, and generic programming. For a longer explanation, read Why C++ isn’t just an object–oriented programming language. See also: hybrid language.

357
Q

pure virtual function

A

virtual function that must be overridden in a derived class. Indicated by the curious =0 syntax. A pure virtual function can be defined in the class where it is declared pure, but needn’t be and usually isn’t. A class with at least one pure virtual function is an abstract class. TC++PL 12.3. D&E 13.2.1.

358
Q

push_back()

A

member function that adds an element at the end of a standard container, such as vector, thereby increasing the container’s size by one. Example. TC++PL 3.7.3, 16.3.5, E.3.4.

359
Q

put function

A

see <<.

360
Q

qualified name

A

name qualified by the name of its enclosing class or namespace using the scope resolution operator ::. For example, std::vector or ::main. TC++PL 4.9.3, 8.2.1, 10.2.4, 15.2.1, 15.2.2, D&E 3.11.3.

361
Q

queue

A

standard library first–in–first–out sequence. TC++PL 17.3.2.

362
Q

RAII

A

see resource acquisition is initialization.

363
Q

random number generator

A

function or function object producing a series of pseudorandom numbers according to some distribution. TC++PL 22.7.

364
Q

raw memory

A

see uninitialized memory.

365
Q

realloc()

A

C standard allocation function. Use vector and push_back() instead.

366
Q

recursion

A

a function calling itself, hopefully with different arguments so that the recursion eventually ends with a call for which the function doesn’t call itself. See also: iteration. TC++PL 7.1.1.

367
Q

reference

A

an alternative name for an object or a function. See also: operator overloading, call–by–reference. TC++PL 5.4.1, D&E 3.7.

368
Q

regression testing

A

systematically checking that a new version of a program doesn’t break correct uses of a previous version of the program.

369
Q

reinterpret_cast

A

a type conversion operation that reinterprets the raw memory of an object as a value of another type. The result of a reinterpret_cast can only be portably used after being converted back into its original type. Use only as a last resort. See also: cast. TC++PL 6.2.7, D&E 14.3.3.

370
Q

resource

A

any entity that a program acquires and releases. Typical examples are free store, file handles, threads, sockets. See also: resource acquisition is initialization, exception safety, basic guarantee, resource management. TC++PL 14.4, E.2–3 D&E 16.5.

371
Q

resource acquisition is initialization

A

A simple technique for handling resources in programs using exceptions. One of the keys to exception safety. Example. TC++PL 14.4, E.3 D&E 16.5.

372
Q

resource leak

A

programming error causing a resource not to be released. See also: resource acquisition is initialization, basic guarantee. TC++PL 14.4, E.2–3 D&E 16.5.

373
Q

resource management

A

a way of acquiring and releasing a resource, such as memory, thread, or file. See also: resource acquisition is initialization, auto_ptr, vector. TC++PL 14.4, D&E 10.4.

374
Q

resumption semantics

A

In some languages, but not C++, an exception handler can respond by telling the thrower to resume (``just carry on as if the problem hadn’t happened). This looks like a good idea in some cases, but in general leads to contorted code because of unfortunate dependencies between separate levels of abstraction. See also: termination semantics. TC++PL 14.4.5, D&E 16.6.

375
Q

return type relaxation/co–variant return type

A

Allowing a virtual function returning a B* or a B& to be overridden by a function with a return type D* or D&, provided B is a public base of D. See also: overriding. TC++PL 15.6.2, D&E 13.7.

376
Q

reverse iterator

A

iterator for iterating through a sequence in reverse order. TC++PL 19.2.5.

377
Q

Ritchie

A

Dennis Ritchie is the designer and original implementer of C. Co–author of Kernighan & Ritchie: The C programming Language.

378
Q

RTFM

A

Read The Manual (The ‘F’ is silent). Usually a very good idea.

379
Q

RTTI

A

see Run Time Type Information.

380
Q

run time type information

A

information about a type available at run time through operations on an object of that type. See also: dynamic_cast, typeid(), and type_info. TC++PL 15.4, D&E 14.2.

381
Q

rvalue

A

an expression that may appear on the right–hand side of an assignment, but not of the left–hand side; for example, 7. D&E 3.7.1.

382
Q

scope

A

a region of source text delimited by curly braces: { … }, a list of function or template parameters, or all of a translation unit outside other scopes. See also: block, namespace, global scope. TC++PL 2.9.4.

383
Q

SDE

A

Software Development Environment. An environment of editors, compilers, tools, libraries, etc. used by a programmer to produce software. There are many SDEs for C++, but no standard SDE.

384
Q

selection–statement

A

if–statement or switch–statement. TC++PL 6.3.2.

385
Q

self

A

see this.

386
Q

semantics

A

the rules specifying the meaning of a syntactically correct construct of a program. For example, specifying the actions taken to perform a for–statement or an object definition.

387
Q

separate compilation

A

the practice of compiling parts of a program, called translation units, separately and then later linking the results together using a linker. This is essential for larger programs. See also: linkage, header file, one definition rule. TC++PL 2.4.1, 9.1. D&E 2.5.

388
Q

separately compiled

A

see separate compilation.

389
Q

sequence adapter

A

a class that provides a modified interface to another. For example, a standard library stack is an adapter for a more flexible data structure such as a vector. See also: adapter, stack, queue, priority_queue. TC++PL 17.3.

390
Q

set

A

standard library associative container

391
Q

short

A

integer of a size less than or equal to the size of an int. TC++PL 4.4.

392
Q

sibling class

A

two classes are siblings if a class is (directly or indirectly) derived from them both and one is not derived from the other. Note that this is a rather inclusive definition of sibling class in that is does not require that the siblings have the same immediate derived class (I didn’t want to introduce a notion of cousin classes). See also: dynamic_cast, crosscast.

393
Q

signature

A

the set of parameter types for a function; that is, the function’s type ignoring its return type. This is a confusingly specialized definition compared to other programming languages where signature means function type.

394
Q

Simula

A

ancestor of C++ designed by Ole–Johan Dahl and Kristen Nygaard; the source of the C++ class concept. TC++PL 1.4, 2.6.2, D&E 1.1, 3.1.

395
Q

single dispatch

A

the technique of choosing the member function to be invoked based on the object used in the call. See also: double dispatch.

396
Q

size of an object

A

the number of bytes required to represent an object. See also sizeof, alignment. TC++PL 4.6.

397
Q

sizeof

A

operator yielding the size of an object.

398
Q

smart pointer

A

user–defined type providing operators like a function, such as * and ++, and with a semantics similar to pointers. See also: iterator. Sometimes smart a pointer is called a handle. TC++PL 11.10–11, 13.6.3.1, 19.3, 25.7, D&E 11.5.1

399
Q

software

A

a collection of programs

400
Q

sort()

A

standard library algorithm for sorting a random access sequence, such as a vector or an array. Example comparing sort() to qsort(). TC++PL 18.7.1.

401
Q

source file

A

.c file or header.

402
Q

specialization

A

a class or function generated from a template by supplying a complete set of template arguments. TC++PL 13.2.2, 13.5, D&E 15.10.3.

403
Q

stack

A

(1) memory used to hold local variables for a function. (2) standard library first–in–last–out sequence. TC++PL 10.4.3, 17.3.1, D&E 2.3, 3.9.

404
Q

Standard C++

A

C++ as defined by ISO.

405
Q

standard header

A

header for standard library facility. Included using the #include< … > syntax. TC++PL 9.2.2, 16.1.2.

406
Q

standard library

A

The library defined in the C++ standard. Contains strings, stream I/O, a framework of containers and algorithms, support for numerical computation, support for internationalization, the C standard library, and some language support facilities. See also: complex, valarray, locale. TC++PL 16–22, D, E.

407
Q

standards committee

A

see C++ standards committees.

408
Q

statement

A

the basic unit controlling the execution flow in a function, such as if–statement, while–statement, do–statement, switch–statement, expression statement, and declaration. TC++PL 6.3.

409
Q

static

A

(1) keyword used to declare a class member static; meaning allocated in static memory. For a member function, this implies that there is no this pointer. (2) keyword used to specify that a local variable should be allocated in static memory. (3) deprecated: keyword used to specify that a global name should not be visible from other translation units. TC++PL 7.1.2, 10.2.4, 10.4.8–9.

410
Q

static member

A

member of a class for which there is only one copy for the whole program rather than one per object. TC++PL 10.2.4, D&E 13.4.

411
Q

static member function

A

a member function that need not be called for an object of the class. TC++PL 10.2.4, D&E 13.4.

412
Q

static memory

A

memory allocated by the linker. TC++PL 10.4.3, D&E 2.3, 2.11.1, 3.9, 11.4.2.

413
Q

static type

A

the type of an object as known to the compiler based on its declaration. See also: dynamic type.

414
Q

static type safety

A

type safety enforced before a program starts executing (at compile time or at static link time).

415
Q

static variable

A

variable allocated in static memory. TC++PL 7.1.2, 10.2.4, 10.4.3, D&E 3.9.

416
Q

static_cast

A

a type conversion operation that converts between related types, such as pointer types within a class hierarchy and between enumerations and integral types. See also: cast, dynamic_cast. TC++PL 6.2.7, 15.4.2.1, D&E 14.3.2.

417
Q

Stepanov

A

Alex Stepanov is the original designer and implementer of the STL. D&E 11.15.2.

418
Q

STL

A

the Standard Template Library by Alex Stepanov, which became the basis for the containers, algorithms, and iterators part of the ISO C++ standard library. TC++PL 15–19.

419
Q

strcmp()

A

a C–style standard library function for comparing C–style strings.

420
Q

stream

A

see iostream.

421
Q

stream I/O

A

see iostream.

422
Q

string

A

standard–library type representing a sequence of characters, support by convenient operators, such as == and +=. The general form of of strings, basic_string, supports strings of different kinds of characters. TC++PL 3.5, 20.

423
Q

string stream

A

stream attached to a string. See also, stringstream, istringstream, ostringstream. TC++PL 21.5.3.

424
Q

stringstream

A

a string stream for input and output.

425
Q

strong guarantee

A

the guarantee that an exception thrown by an operation leaves every object in the state in which it was before the start of the operation. Builds on the basic guarantee. See also exception safety, nothrow guarantee, and basic guarantee. TC++PL E.2.

426
Q

strstream

A

deprecated ancestor of stringstream.

427
Q

struct

A

class with members public by default. Most often used for data structures without member functions or class invariants, as in C–style programming. TC++PL 5.7, 10.2.8, D&E 3.5.1.

428
Q

subclass

A

a derived class.

429
Q

subtype

A

see derived class. See also: public base.

430
Q

suffix operator

A

a postfix operator.

431
Q

superclass

A

a base class.

432
Q

switch–statement

A

statement selecting among many alternatives based on an integer value. TC++PL 6.3.2.

433
Q

syntax

A

the set of gramatical rules specifying how the text of a program must be composed. For example, specifying the form of a declaration or the form of a for–statement.

434
Q

template

A

class or function parameterized by a set of types, values, or templates. See also template instantiation, specialization, template class, template function. TC++PL 2.7, 13, D&E 15.

435
Q

template argument

A

an argument to a template.

436
Q

template argument constraint

A

see constraint.

437
Q

template definition

A

declaration of a template class or of a template function including a function body.

438
Q

template instantiation

A

the process of creating a specialization from a template. TC++PL 13.2.2, D&E 15.10.

439
Q

template parameter

A

a parameter of a template.

440
Q

terminate()

A

If an exception is thrown but no handler is found, terminate() is called. By default, terminate() terminates the program. If program termination is unacceptable, a user can provide an alternative terminate() function. If you are worried about uncaught exceptions, make the body of main() a try–block. TC++PL 14.7.

441
Q

termination semantics

A

a somewhat ominous terminology for the idea that throwing an exception terminates an operation and returns through the function call chain to a handler. The handler can initiate any error handling it likes, including calling the function that caused the exception again (presumably after fixing the problem that caused the problem). What a handler can’t do is simply tell the thrower to just carry on; by the time the handler is invoked we have returned from the block/function that threw and all blocks/functions that led to it from the handler’s try–block. See also: resumption semantics. TC++PL 14.4.5, D&E 16.6.

442
Q

ternary operator

A

an operator taking three operands, such as ?:.

443
Q

testing

A

systematically verifying that a program meets its specification and systematically searching for error.

444
Q

this

A

pointer to the object for which a non–static member function is called. TC++PL 10.2.7, D&E 2.5.2.

445
Q

throw

A

operation for interrupting the normal flow of control and returning to an appropriate exception handler identifyed by the type of the exception throw. See also: catch, exception handling. TC++PL 8.3.1, 14.3, D&E 16.3.

446
Q

trait

A

a small policy object, typically used to describe aspects of a type. For example, iterator_trait specifies the types resulting from operations on an iterator T. TC++PL 19.2.2.

447
Q

translation unit

A

a part of a program that can be separately compiled. TC++PL 9.1.

448
Q

trigraph

A

alternative representation for C++ representation characters that doesn’t exist in every national character set, such as {, }, [,], and #: ??, ??(, ??), and ??=. TC++PL C.3.1.

449
Q

TRUE

A

bool value; converts to 1. TC++PL 4.2, D&E 11.7.2.

450
Q

try

A

keyword used to start a try–block.

451
Q

try–block

A

a block, prefixed by the keyword try, specifying handlers for exceptions. See also: catch, exception handling. TC++PL 8.3.1,14.3, D&E 16.3.

452
Q

two–phase lookup

A

a somewhat complicated mechanism used in compilation of templates. Names that do not depend on a template parameter are looked up (and bound) early, i.e., when the template template definition is first seen (phase 1 lookup). Names that depend on a template parameter are looked up late, i.e. during template instantiation (phase 2 lookup) so that the lookup can find names relating to actual template arguments. TC++PL C::13.8.

453
Q

type

A

a built–in type or a user–defined type. A type defines the proper use of a name or an expression. TC++PL 2.3.1, 4.1.

454
Q

type checking

A

the process of checking that every expression is used according to its type. the compiler checks every expression based on the declared types of the names involved. TC++PL 7.2–3, 24.2.3, D&E 2.3, 2.6, 3.10, 3.15, 9.2.2.1.

455
Q

type conversion

A

producing a value of one type from a value of another type. A type conversion can be an implicit conversion or an explicit conversion. See also: user–defined type conversion, cast. TC++PL 6.2.7.

456
Q

type safety

A

the property that an object can be accessed only according to its definition. C++ approximates this ideal. A programmer can violate type safety by explicitly using a cast, by using an uninitialized variable, by using a pointer that doesn’t point to an object, by accessing beyond the end of an array, and by misusing a union. For low–level systems code, it can be necessary to violate type safety (e.g. to write out the byte representation of some objects), but generally type safety must be preserved for a program to be correct and maintainable.

457
Q

type system

A

the set of rules for how objects can be used according to their types. See also: type checking.

458
Q

typedef

A

synonym for some type declared using the keyword typedef.

459
Q

typeid()

A

operator returning basic type information. TC++PL 15.4.4, D&E 14.2.5.

460
Q

typename

A

(1) an alternative to class when declaring template arguments; for example, template void f(T); (2) a way of telling a compiler that a name is meant to name a type in template code; for example template void f(T a) { typename T::diff_type x = 0; … }. TC++PL C::13.5.

461
Q

type_info

A

class containing basic run time type information. TC++PL 15.4.4, D&E 14.2.5.1.

462
Q

unary operator

A

an operator taking one operand, such as ! and unary *.

463
Q

uncaught exception

A

Exception for which no handler was found. Invokes terminate(), which by default terminates the program. TC++PL 14.7.

464
Q

undefined

A

an aspect of C++’s semantics for which no reasonable behavior is required. An example is dereferencing a pointer with the value zero. Avoid undefined behavior. See also: implementation defined. TC++PL C.2.

465
Q

uninitialized memory

A

memory that hasn’t been initialized to hold a specific value of a type. TC++PL 19.4.4.

466
Q

union

A

a struct with all members allocated at the same offset within an object. The language does not guarantee type safety for all uses of unions. Primarily used to save space. TC++PL C.8.2.

467
Q

upcast

A

a cast from a derived class to one of its bases. See also: downcast, crosscast. TC++PL 15.4.

468
Q

user–defined type

A

Class or enumeration. A programmer can define meanings for operators for user–defined types. See also: operator overloading. TC++PL 6.2, 11, D&E 3.6, 11.7.1.

469
Q

user–defined type conversion

A

a user can define conversions either as constructors or conversion operators. These conversions are applied explicitly or implicitly just like built–in conversions. TC++PL 11.3.5, 11.4, D&E 3.6.1, 3.6.3.

470
Q

using

A

see using–directive and using–declaration.

471
Q

using–declaration

A

declaration of a local synonym for a name in another namespace or class. Example of using–declaration used to simplify overloading. See also: overloading, argument–based lookup. TC++PL 8.2.2. D&E 17.4.

472
Q

using–directive

A

directive making a namespace accessible. See also: argument–based lookup. TC++PL 8.2.3. D&E 17.4.

473
Q

valarray

A

standard library numeric vector type supporting vector operations. TC++PL 22.4.

474
Q

value

A

the bits of an object interpreted according to the objects type.

475
Q

value return

A

The semantics of function return is to pass a copy of the return value. The copy operation is defined by the return type’s copy constructor. TC++PL 7.4.

476
Q

variable

A

named object in a scope. TC++PL 2.3.1, 10.4.3, D&E 2.3.

477
Q

variable definition

A

declaration of a named object of a data type without an extern specifier.

478
Q

vector

A

standard library template providing contiguous storage, re–sizing and the useful push_back() functions for adding elements at the end. Vector is the default container. See also: map, multimap, list, deque. TC++PL 3.7.1, 16.3.

479
Q

virtual

A

keyword used to declare a member function virtual.

480
Q

virtual base

A

a base that is shared by all classes in a class hierarchy that has declared it virtual. TC++PL 15.2.4, D&E 12.3, 12.4.1.

481
Q

virtual constructor

A

a constructor cannot be virtual, because to create an object, we need complete information of its type. virtual constructor is the name of a technique for calling a virtual function to create an object of an appropriate type. Example. TC++PL 12.4.4, 15.6.2.

482
Q

virtual destructor

A

a destructor declared virtual to ensure that the proper derived class destructor is called if an object of a derived class is deleted through a pointer to a base class. If a class has any virtual functions, it should have a virtual destructor. Example. TC++PL 12.4.2, D&E 10.5.

483
Q

virtual member function

A

a member function that a derived class can override; the primary mechanism for run–time polymorphism in C++. A virtual member function is sometimes called a method. See also: overriding, pure virtual function. TC++PL 2.5.4, 2.5.5, 12.2.6, D&E 3.5, 12.4.

484
Q

virtual–function pointer

A

a pointer to a class’ virtual function table.

485
Q

virtual–function table

A

table of all virtual functions for a class. The most common way of implementing virtual functions is to have each object of a class with virtual functions contain a virtual function pointer pointing to the class’ virtual function table.

486
Q

visitor pattern

A

a way of using double dispatch to simulate virtual calls without adding new virtual functions.

487
Q

void

A

a keyword used to indicate an absence of information. TC++PL 4.1.1, 4.7.

488
Q

void*

A

pointer to void; that is, a pointer to an object of unknown type; also called pointer to raw memory. A void* cannot be used or assigned without a cast. TC++PL 5.6, D&E 11.2.1, 11.2.3.

489
Q

volatile

A

attribute of a declaration telling the compiler that an entity can have its value changed by extralinguistic means; for example, a real time clock: extern volatile const long clock;. Limits optimizations. TC++PL A.7.1.

490
Q

vptr

A

see virtual–function pointer.

491
Q

vtbl

A

see virtual–function table.

492
Q

wchar_t

A

wide character type. Used to hold characters of character sets that require more than a byte to represent, such as unicode. TC++PL 4.3, C.3.3. See also: large character sets, universal character name.

493
Q

WG21

A

a common abbreviation of the name of the ISO C++ standards committee.

494
Q

while–statement

A

a loop statement presenting its condition at the top. For example, while (cin>>var) vec.push_back(var);

495
Q

whitespace

A

characters that a represented only by the space they take up on a page or screen. The most common examples are space (‘ ‘), newline (‘\n’), and tab (‘\t’).

496
Q

word

A

a number of bytes that on a given machine is particularly suied to holding an integers or a pointer. On many machines, an object must be aligned on a word boundary for acceptable performance. An int is typically a stored in a word. Often, a word is 4 bytes. See also: alignment. TC++PL 4.6.

497
Q

xor

A

synonym for ^, the bitwise exclusive or operator TC++PL C.3.1.

498
Q

zero

A

see NULL