Modified October 3, 2012
This is a glossary of C++ terms, organized alphabetically by concept.
The definitions/explanations of individual terms are necessarily very brief.To compensate, each entry includes one or more references toThe C++ Programming language (Special Edition)(TC++PL)where you can find more comprehensive explanations and code examples.I use section references, rather than page numbers, so that this glossary canbe used together with translations of my books.It is always wise to read a whole section rather than trying to gleaninformation from a few semi-random sentences.
For people interested in the reasons behind the design of C++,most entries also refer toThe Design and Evolution of C++(D&E).Some entries contain links other parts of my home pages, especially tomyFAQ andC++ Style and Technique FAQ.If I find the time, I'll add references to the ISO standard.
This glossary is specifically "C++ oriented". That is, it defines terms inthe context of C++. For example, it defines generic programming in terms oftemplates and object-oriented programming in terms of virtual functions,rather than trying to be sufficiently abstract and general to cover alllanguages and all usages.
The entries are meant to be brief explanations, rather than precisedefinitions.
Suggestions for improved explanations, terms to add, or anything else thatwould make the glossary more useful, are most wellcome: bs at cs dot tamu dot edu.
#define - a directive that defines amacro.
#include - a mechanism for textual inclusion of onesource file into another.Typically used to compose atranslation unit out of a.c fileand theheader files it needs to define its view if the restof theprogram. TC++PL 2.7, 13, D&E 18.1.
+= - add-and-assignoperator; a+=b is roughly equivalent to a=a+b.Often a useful operation foruser-defined types.TC++PL 6.1.1, 6.2, 11,3,2, 20.3.9, 22.5.
.c file -file containingdefinitions.
.h file - seeheader file.
14882 -ISO/IEC 14882 - Standard for theC++Programming Language.
<< - (1)iostreamoutputoperator.TC++PL 3.4, 21.2.1, D&E 8.3.1.(2) integer left-shift operator.TC++PL 6.2.
= - theassignment operator;not anequality operator.= can be used for non-constbuilt-in types (exceptarrays),enumerations,strings,containers,iterators,complex, andvalarray.For aclass, = is by default definedmember-wise assignment; ifnecessary, the writer of a class can define it differently.TC++PL 2.3.1, 6.2, 11.2, 16.3.4, 20.3.6, 22.4.3, 22.5,D&E 2.12.1,11.4.4.
=0 - curious notation indicating that avirtualfunction is apure virtual function.TC++PL 12.3. D&E 13.2.1.
== - theequality operator; comparesvalues for equality returning abool.== can be used forbuilt-in types,enumerations,strings,iterators,complex, andvalarray.== is not by default defined for aclass, but a user can define itfor auser-defined type.Note that == doesn't have the naively expected meaning forC-style strings or arrays.TC++PL 2.3.1, 6.2, 16.3.10, 20.3.8, 22.4.3, 22.5.
>> - (1)iostreaminputoperator.TC++PL 3.6, 21.3.2, D&E 8.3.1.(2) integer right-shift operator.TC++PL 6.2.
abstract class - aclass defining aninterface only; used as abase class.Declaring amember function purevirtual makes its class abstractand prevents creation ofobjects of the abstract class.Use of abstract classes is one of the most effective ways ofminimizing the impact of changes in aC++program and for minimizingcompilation time.Example.TC++PL 2.5.4, 12.4.2, D&E 13.2.
abstract type - seeabstract class.
abstraction - the act of specifying a generalinterfacehiding implementationdetails.Classes,abstract classes, andtemplates are the primaryabstraction mechanisms inC++.See also:encapsulation.
access control - access to bases andmembers of aclass can be controlled by declaringthempublic,protected, orprivate.TC++PL 15.3, D&E 2.3, 13.9.
ACCU -Association of C and C++ Users.A users group that amongother things maintains acollection of professional book reviews.
adapter - aclass that takesarguments producing afunction object thatperforms an operation based on those arguments. A simple form ofahigher-order function.For example,mem_fun() adapts amember function for use by thestandardalgorithms.See also:sequence adapter.TC++PL 18.4.4.
address - amemory location.TC++PL 5.1.
aggregate - anarray or astruct without aconstructor.
algorithm - a precise definition of a computation.Thestandard library provides about 60 standard algorithms, such assort(), search(), and copy_unique().TC++PL 3.8, 18.
alignment - placingobjects inmemory to suit hardware requirements. On manymachines, an object must be aligned on aword boundary for acceptableperformance.
allocator -object used bystandard librarycontainers to allocate and deallocatememory.TC++PL 19.4.
and - synonym for &&, the logical andoperator.TC++PL C.3.1.
ANSI - The American national standards organization. Cooperates closelywithISO over theC++ standard.
application - acollection ofprograms seen as serving a common purpose(usually providing a commoninterface to their users).
argument - avalue passed to afunction or atemplate.In the case of templates, an argument is often atype.
argument passing - Thesemantics offunction call is to pass a copy of anargument.The copy operation is defined by the argumenttype'scopy constructor or by binding to areference.In either case the semantics is those ofinitialization.TC++PL 7.2.
argument-based lookup - lookup of afunctionname oroperator based on thenamespace of thearguments or operands.Often calledKoenig lookup after Andrew Koenig who proposed thescheme to thestandards committee.TC++PL 8.2.6, 11.2.4, C.13.8.4.
ARM -The Annotated C++ Reference Manual byMargaret Ellis andBjarne Stroustrup. The 1990 C++ referencemanual with detailedcomments aboutdesign details and implementationtechniques.Now outdated.See also:C++ standard.
array - contiguous sequence ofelements. An array doesn't know its own size;the programmer must take care to avoid range errors.Where possible use thestandard libraryvector.TC++PL 5.2-3, C.7.
assignment operator - see=.
AT&T Bell Labs. - the industrial research and development labs whereC andC++ wereinvented, initially developed, and initially used.D&E 2.14.
auto - InC andC++98 a largely useless keyword redundantly indicatingstack allocation forlocalvariables. InC++0x a keyword indicating that a variable gets itstype from its initializer. For example:double d1= 2; auto d2 = 3*d1; (d2 will have type double).Primarily useful ingeneric programming.
automatic garbage collection - seegarbage collection.
auto_ptr -standard libraryclass template for representing ownership of anobject in a way thatguarantees proper release (delete) even when anexception is thrown.See also:resource management,resource acquisition is initialization.TC++PL 14.4.2.
back-end - the parts of acompiler that generates code given an internalrepresentation of a correctprogram.This representation is produced by a compilerfront-end.See also: front-end.
backslash - seeescape character.
back_inserter() - returns aniterator that can be used to addelements at the backof acontainer.TC++PL 19.2.4.
bad_alloc - standardexception thrown bynew in case of failure to allocatefree store.TC++PL 6.2.6.2, 19.4.5.
bad_cast - standardexception thrown if adynamic_cast to areference fails.TC++PL 15.4.1.1, D&E 14.2.2.
base class - aclass from which another is derived. TC++PL 2.6.2, 12, 15, D&E 2.9.
base initializer - initializer for abase class specified in theconstructor for aderived class.TC++PL 12.2.2, 15.2.4.1, D&E 12.9.
basic guarantee - the guarantee that basicinvariants are maintained if anexception isthrown and that noresources are leaked/lost.Provided by allstandard library operations.See alsoexception safety,nothrow guarantee, andstrong guarantee.TC++PL E.2.
basic_string - general standard-librarystringtemplate parameterized bycharacter type.See also: string,C-style string.TC++PL 20.3.
BCPL - ancestor toC andC++ designed and implemented by Martin Richards.TC++PL 1.4, D&E 1.1, 3.1.
Bell labs - seeAT&T Bell Labs.
binary operator - anoperator taking two operands, such as /, &&, and binary *.
binder - afunction taking a function and avalue, returning afunction object;when called, that function object will invoke the function with thevalue as anargument in addition to other arguments supplied in thecall.Thestandard library provides bind1st() and bind2nd() for bindingthe first and second argument of a binary function, respectively.TC++PL 18.4.4.
bit - a unit ofmemory that can hold 0 or 1. An individual bit cannot bedirectly accessed inC++ (the unit of addressing is abyte), but abit can be accessed through abitfield or by using the bitwiselogicaloperators & and |.TC++PL 6.2.4.
bitand - synonym for &, the bitwise andoperator.TC++PL C.3.1.
bitfield - a number ofbits in aword made accessible as astructmember.TC++PL C.8.1
bitor - synonym for |, the bitwise oroperatorTC++PL C.3.1.
bitset - astandard library "almostcontainer" holding Nbits and providinglogical operations on those.TC++PL 17.5.3.
Bjarne Stroustrup - the designer and original implementor ofC++.The author of thisglossary.See also:my home page.
block - seecompound statement.See also:try-block.
block comment -comment started by /* and terminated by */.TC++PL 6.4, D&E 3.11.1.
bool - the built-in Booleantype.A bool can have thevaluestrue andfalse.TC++PL 4.2, D&E 11.7.2.
boost.org - acollection of people - many with ties to theC++ standards committee -devoted to creating a body of quality - peer reviewed - open sourcelibraries designed to interoperate with thestandard library.Their central "home" istheir website.
Borland C++ Builder - Borland's implementation ofC++ together with proprietary librariesfor Windows programming in anIDE.
bug - colloquial term for error.
built-in type - Atype provided directly byC++, such asint,double, andchar*.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.
byte - a unit ofmemory that can hold a character of theC++ representationcharacter set.The smallest unit of memory that can be directly addressed in C++.Usually, a byte is 8bits.TC++PL 4.6.
C -programming language designed and originally implemented byDennisRitchie.C++ is based on C and maintains a high degree ofcompatibility with C.See also:K&R C,C89,C99,ANSI C.TC++PL B, D&E 3.12.
C standard library - the library defined forC in the C standard.Inherited byC++.Most Cstandard libraryfunctions have safer and more convenientalternatived in theC++ standard library.See also:algorithm,container,stream I/O,string,locale.
C++ - ageneral-purpose programming language with a bias towardssystems programming that supportsprocedural programming,data abstraction,object-oriented programming, andgeneric programming.C++ was designed and originally implemented byBjarne Stroustrup.C++ is defined byISO/IEC14882 - Standard for the C++ Programming Language.TC++PL describes C++ and the fundamental techniques for its use.A description of the design considerations for C++ can be foundinD&E.Many commercial andfree implementations exist.TC++PL 1.3,-5, 2.1, D&E 0.
C++ standard - the definition ofC++ provided byISO.Available fromANSI; seemy C++ page.TC++PL 1.4, B.1. D&E 6.1.
C++ standards committees - theISO committee forC++(WG21)and the various national standardscommittees that closely cooperate with it (BIS, AFNOR, DIN, etc.).Didthe ANSI/ISO standards committee spoil C++?.See also:C++ Standard.D&E 6.2.
C++ standards process - seeC++ standards committees
C++/CLI - A set of Microsoftextensions toC++ for use with their .Net system.SeeFAQ comments.
C++03 -name for the minor revision of theC++ standard represented by the 2003 corrigenda("abug fix release").
C++0x - the upcoming revision of theISO C++ standard; 'x' is scheduled to be '9'.Seemy publicatons page.
C++98 - theISO C++ standard.Seemy C++ page.
C-style cast - dangerous form ofexplicit type conversion; prefernew-style castif you must use explicit type conversion.TC++PL 6.2.7, D&E 14.3.5.1.
C-style string -zero-terminatedarray of characters, supported byC standard libraryfunctions.A low-level and error-prone mechanism; where possible preferstrings.TC++PL 3.5.1, 20.3.7, 20.4.
C/C++ - (1) an abbreviation used when discussing similarities, differences,andcompatibility issues ofC andC++.(2) a mythical language referred to by people who cannot or do notwant to recognize the magnitude of differences between the facilitiesoffered by C and C++ or the significant differences in theprogramming styles supported by the two language.See also:multi-paradigm programming,object-oriented programming,generic programming,exception,template,user-defined type,C++ standard library.
C/C++ compatibility -C++ was designed to be as compatible as possible to C, but no more.This basically means as compatible as can be without compromisingC++'s level oftype safety.You can download Appendix B ofTC++PL,.Compatibility, which describesincompatibilities and differences in facilities offered by C and C++.TC++PL B. D&E 2.7, 3.12, 4.5.
C89 - The 1989ANSI standard forC based onK&R C with a few additionsborrowed fromC++, such asfunction prototypes andconst.See also: K&R C,C99.
C99 - The 1999ISO standard forC based onC89 with additions to supportFortran-style numeric computation. It also borrows a few more features,such asline comments (// comments) anddeclarations asstatements,fromC++.
call-by-reference - declaring afunction argumenttype to be areference, thus passinga reference rather than avalue to the called function.See Also:call-by-value.TC++PL 5.5, D&E 3.7.
call-by-value - passing a copy of anargument to the calledfunction.Thesemantics of function call is to pass a copy of an argument.The copy operation is defined by the argumenttype'scopy constructor.See Also:call-by-reference.TC++PL 7.2.
cast -operator forexplicit type conversion; most often best avoided.See alsodynamic_cast,C-style cast,new-style cast.TC++PL 6.2.7, D&E 7.2, 14.2.2.1.
catch - keyword used to introduce acatch-clause.
catch(...) -catch everyexception.TC++PL 14.3.2, D&E 16.5.
catch-clause - a part of atry-block thathandlesexceptions of a specifiedtype.Also called ahandler or anexception handler.TC++PL 8.3.1, 14.3, D&E 16.3-4.
cerr - standard unbufferedostream for error or diagnosticoutput.TC++PL 21.2.1.
Cfront - thefront-end ofBjarne Stroustrup's originalC++compiler.D&E 3.3.
char -character type; typically an 8-bitbyte.See also:wchar_t.TC++PL 4.3, C.3.4.
char* -pointer to achar or anarray of char. Typically assumed to pointto aC-style string.Prefer astandard library string over a C-style string when you can.TC++PL 2.3.3, 13.5.2.
character set - a set of integervalues with a mapping to character representations;for example, ASCII (ANSI13.4-1968) gives meaning to the values 0-127.ASCII isC++'s representation character set, the character set usedto representprogram source text.TC++PL C.3. D&E 6.5.3.
character type -char, unsigned char, and signed char. These are three distincttypes.See also:wchar_t.TC++PL 2.3.1, 4.3, C.3.4.
cin - standardistream.TC++PL 3.6, 21.3.1 D&E 8.3.1.
class - auser-defined type. A class can havemember functions,member data,member constants, andmember types.A class is thee primary mechanism for representingconcepts inC++.See also:template class.TC++PL 2.5.2, 10, D&E 2.3.
class hierarchy - acollection ofclasses 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.
class template - seetemplate class.
clone - afunction that makes a copy of anobject; usually a clone function relies on run-timeinformation (e.g. avirtual function call) to correctly copy an object given only apointer or reference to a sub-object.
closure -object representing a context.C++ does not have general closures,butfunction objects can be efficiently used to hold specific partsof a context relevant to a computation.TC++PL 22.4.7, 18.4.
co-variant return type - seereturn type relaxation.
code generator - the part of acompiler that takes theoutput from thefront-end andgenerates code from it.See also:back-end,optimizer.
collection - a term sometimes used as a synonym forcontainer.
Comeau C++ - a family of ports of theEDG C++ front-end.
comment -block comment /* ... */ orline comment // ...
compatibility - seeC/C++ compatibility.
compiler - the part of aC++ implementation that producesobject code from atranslation unit.See also:front-end,back-end.
complex -standard library complex numbertemplate parameterized by scalartype.TC++PL 11.3, 22.5, D&E 3.6.1, 8.5, 15.10.2.1.
compound statement - sequence ofstatements enclosed in curly braces: { ... }See also:try-block.TC++PL 2.3, 6.3.
concept - aC++ language construct, providingtype chaecking fortemplate arguments.
concept checking - seeconstraint.
concrete type - atype withoutvirtualfunctions, so thatobjects of the type canbe allocated on thestack and manipulated directly (without a need tousepointers or references to allow the possibility for derivedclasses). Often, small self-contained classes.See alsoabstract class,vector,list,string,complex.TC++PL 25.2.
const - attribute of adeclaration that makes the entity to which it refersreadonly.See also:const member function.TC++PL 5.4, D&E 3.8.
const definition -declaration of aconst including an initializer.
const member function -member function declared not to modify the state of theobject forwhich it is called. Can be called forconst objects only.TC++PL 10.2.6, D&E 13.3.
constant -literal,object orvalue declaredconst, orenumerator.
constant expression -expression ofintegral type that is evaluated at compile time.TC++PL C.5.
constraint - rule that restricts the set of acceptablearguments for atemplateparameter. For example "the argument must have + and -operators".Examples.D&E 15.4.
constructor -member function with the samename as itsclass, used to initializeobjects of its class.Often used to establish aninvariant for the class.Often used to acquireresources.A constructor establishes a local environment in whichmember functions execute.See also:order of construction,destructor.TC++PL 10.2.3, D&E 2.11.1.
const_cast - atype conversion operation that conversion between types thatdiffer inconst andvolatile type modifiers only.See also:cast.TC++PL 15.4.2.1, D&E 14.3.4.
container - (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 asvector,list, andmap.TC++PL 16.2, 16.2.3, 17, D&E 15.3.
controlled variable - avariable used to express the part of the exit condition of aloop that varies each timearound the loop. For example ``i'' in for (int i=0; i<max; ++i) f(i);
conversion -explicit type conversion orimplicit type conversion.See also:user-defined type conversion.
conversion operator -operator function specifying aconversion from auser-defined typeto either another user-defined type or abuilt-in type.Note thatconstructors cannot define conversions to built-in types.TC++PL 11.4, D&E 3.6.3.
copy assignment - an assignment accepting anobject of theclass itself as itsargument,typically Z::operator=(const Z&).A copy assignment is used for assignmentof an object oftype 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.
copy constructor - aconstructor accepting anobject of theclass itself as itsargument,typically Z::Z(const Z&). A copy constructor is used forinitializationof objects oftype 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.
copy() - standardalgorithm for copying one sequence into another.The two sequences need not be of the sametype.TC++PL 18.6.1.
copying class object - anobject of aclass is copied by the class'copy assignment andcopy constructors.The default meaning of these operations ismemberwise copy.TC++PL 10.4.4.1, 10.4.6.3 D&E 11.4.
cout - standardostream.TC++PL 3.4, 21.2.1, D&E 8.3.1.
cpp - seepreprocessor.
crosscast - acast from aclass to asibling class.See also:dynamic_cast,upcast,downcast.TC++PL 15.4.
Currying - producing afunction of N-Marguments by specifying M arguments fora function of N arguments.See also:binder,default argument.TC++PL 18.4.4.1.
D&E -Bjarne Stroustrup:The Design and Evolution of C++.Addison Wesley. 1994.A book describing why C++ looks the way it does - the closest to adesign rationale that we have for C++.
data abstraction - programming relying onuser-defined types with well-definedinterfaces.See also:generic programming andobject-oriented programming.TC++PL 2.5, 24.2.2, D&E 9.2.1.
data hiding - seeinformation hiding
data member -member of aclass that can hold avalue.A memer can be astatic member or anon-static member.TC++PL 2.5.2-3, 10.2, D&E 2.3, 2.5.2.
declaration - an introduction of aname into ascope. Thetype of the name must bespecified. If the declaration also specifies the entity to which thename refers, the declaration is also adefinition.TC++PL 4.9, D&E 3.11.5.
decltype -C++oxoperator meaning thetype of its operand.For example:constdouble& d1=2.0; decltype(d1) d2;(d2 will also be a const double&).Primarily useful for writing forwardingfunctions ingeneric programming.
default argument - avalue specified for anargument in afunction declaration, to beused if a call of the function doesn't specify a value for thatargument.This is commonly used to allow a simpleinterface for common useswhile making it easy to use less common facilities by specifyingmore arguments.See also:default template argument,binder.TC++PL 7.5, 10.2.3, D&E 2.12.2.
default constructor -constructor requiring noarguments. Used for defaultinitialization.TC++PL 10.4.2, 10.4.6, D&E 2.12.2, 15.11.3.
default template argument - atype orvalue specified for anargument in atemplatedeclaration,to be used if a use of the template doesn't provide a type or valuefor that argument.This is commonly used to allow a simpleinterface for common useswhile making it easy to use less common facilities by specifyingmore arguments.See also:default argument.TC++PL 13.4.1, B.3.5.
default value -value defined by adefault constructor. Forbuilt-in types, thedefault value is defined to be 0.TC++PL 4.9.5, 10.3.1, 10.4.2 D&E 15.11.3.
definition - adeclaration that specifies the entity to which the declarednamerefers.See also:one definition rule,variable definition,const definition,template definition,function definition.TC++PL 4.9, D&E 15.11.3.
delayed evaluation - technique for eliminating temporaryvalues, and in general to delaya computation until sufficient information is available to do it well.TC++PL 21.4.6.3, 22.4.7.
delete -object destructionoperator. Invokesdestructor, if any.See also:resource management,memory management,garbage collection,operator delete().TC++PL 6.2.6, D&E 2.3, 10.2.
deprecated feature - feature left in aprogramming language for historical reasons only.The standard s committee recommends against its use and warns thatit may be removed in future revisions of the standard.
deque -double-endedqueue (pronounced "deck"). Astandard librarytemplatealowing insertions and deletions at both ends. Use avector if youneed insertions and deletions only at one end (as is typical). Use alist if you need frequent insertions and deletions in the middle.TC++PL 17.2.3.
derived class - aclass with one or morebase classesTC++PL 2.6.2, 12, 15, D&E 3.5.
design - creating a clean and reasonably simple structure of a systemTC++PL 23.3.
design of C++ - seeD&E.
destructor -member of aclass used to clean up before deleting anobject.It'sname is its class' name prefixed by '~'. For example,Foo's destructor is ~Foo().Often used to releaseresources.A destructor is implicitly called whenever an object goes outofscope or is deleted.See also:virtual destructor,order of destruction.TC++PL 10.4.2, D&E 2.11.1, 3.11.2.
digraph - alternative representation forC++ representation characters thatdoesn't exist in every nationalcharacter set, such as {, }, [, ],and #: <%, %., <:, :>, and %:.TC++PL C.3.1.
double - double-precision floating-point number.TC++PL 4.5.
double dispatch - a technique for selecting afunction to be invoked on thedynamic typeof two operands.TC++PL 21.2.3.1, D&E 13.8.
downcast - acast from abase class to one of itsderived classes.Thename reflects thefact that in programming, trees tend to be drawn growing downwardsfrom the roots.See also:dynamic_cast,upcast,crosscast.TC++PL 15.4.
dynamic memory - seefree store.
dynamic type - thetype of anobject as determined at run-time; e.g. usingdynamic_cast or typeid. Also known asmost-derived type.
dynamic type safety -type safety enforced at run time (typically requiring a programmer tocatchexceptionsto deal with violations). An example is range checking forvectors.
dynamic_cast - atype conversion operation that performs safe conversionsusing onrun time type information.Used for navigation of aclass hierarchy.See also:downcast,crosscast,static_cast.TC++PL 15.4.1, D&E 14.2.2, 14.3.2.1.
EDG C++ front-end - a qualityC++compilerfront-end, which is the core of severalwell-regarded C++ compilers.
element - anobject in acontainer.
encapsulation - the enforcement ofabstraction by mechanisms that prevent accessto implementation details of anobject or a group of objectsexcept through a well-definedinterface.C++ enforces encapsulation ofprivate and protecedmembers of aclassas long as users do not violate thetype system usingcasts.See also: interface andaccess control.TC++PL 15.3, 24.3.7.4, D&E 2.10.
enum - keyword for declaringenumerations.TC++PL 4.8, D&E 11.7.
enumeration - auser-defined type consisting of a set of namedvalues.TC++PL 4.8, D&E 11.7.
enumerator - aname identifying avalue of anenumeration.TC++PL 4.8, D&E 11.7.
equality operator - see==.
error handling - seeexception handling.
escape character - the character \, also calledbackslash,sed an initial character in representationsof characters that cannot be represented by a single ASCII character,such as newline ('\n') and horizontal tab ('\t').TC++PL C.3.2.
exception -object thrown by a throw-statement and (potentially) caught by anexception handler associated by atry-block.See also:exception safety,termination semantics,catch.TC++PL 8.3, 14.2, D&E 16.
exception handler - acatch-clause associated with atry-block for handlingexceptionsof a specifiedtype.TC++PL 8.3.1, 14.3, D&E 16.3-4.
exception handling - the primary way of reporting an error that cannot be handled locally.Anexception is thrown and will be caught by anexception handlerorterminate() will be called.See also:exception safety,termination semantics,try-block, throw,catch.TC++PL 8.3, 14, E, D&E 16.
exception safety - the notion that aprogram is structured so that throwing anexceptiondoesn't cause unintended side effects.See also:basic guarantee,strong guarantee, andnothrow guarantee.You can download Appendix EStandard-LibraryException Safety ofTC++PL describing techniques forexception handling.TC++PL E.2.
executable file - the result of linking theobject files of a completeprogram.See also:compiler,linker.
explicit - keyword used to define aconstructor so that it isn't used forimplicitconversions.TC++PL 11.7.1.
explicit call of constructor - Seeplacement new.
explicit call of destructor -destructors are implicitly called when anobject goes out ofscope oris deleted. However, if a user have taken over construction (usingplacement new) and destruction, a destructor must be explicitly called.Example.For example, explicit call of destructor is used in the implementationofstandard librarycontainers.See also: placement new.TC++PL 10.4.11, E.3.1, D&E 10.5.1.
explicit constructor -constructor so that will not be used for implicitconversions.TC++PL 11.7.1.
explicit instantiation -explicit request to instantiate atemplate in a specific context.See also:template instantiation. TC++PL C.13.10, D&E 15.10.1.
explicit qualification - (1) bynamespace name, seequalified name.(2) bytemplate argument.TCP++L 13.3.2.
explicit type conversion -type conversion (explicitly) requested by the use of aC-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.
expression - combination ofoperators andnames producing avalue.TC++PL 6.2.
extended type information - any scheme that provides additional information base on the standardrun time type information.TC++PL 15.4.4.1, D&E 14.2.5.2.
extension - seelanguage extension
extern - a keyword used to indicate that the definition of an entitybeing declared is defined elsewhere.Because "extern: is only necessary for globalvariables it is largely redundant.
extracter - aniostream>> (put to) function.TC++PL 21.2,21.3, D&E 8.3.1.
facet - aclass representing a primitive aspect of alocale, such as a wayof writing an integer or a character encoding.TC++PL D.3.
false -boolvalue; converts to 0.TC++PL 4.2, D&E 11.7.2.
fat interface - aninterface with moremember functions andfriends than are logicallynecessary.TC++PL 24.4.3.
file - a sequence ofbytes or words holding information in a computer.The term "file" is usually reserved to information placed on disk orelsewhere outside the mainmemory.Theiostream part of theC++ standard library providesifstream,ofstream, and fstream asabstraction for accessing files.TC++PL 21.5.
file stream -stream attached to afile.See also,fstream,ifstream,ofstream.TC++PL 21.5.1.
finally - a language construct supporting ad hoc cleanup in some languages.Similar, but not identical toC++'scatch(...).Use the "resource acquisition is initialization" technique instead.
find() -standard library linear searchalgorithm for avalue in a sequence.TC++PL 18.5.2.
find_if() -standard library linear searchalgorithm for anelement meetinga search criterion in a sequence.TC++PL 18.5.2.
float - single-precision floating-point number.TC++PL 4.5.
floating-point literal - the source text representation of a floating pointvalue.For example, 0.314e1.TC++PL 4.5.1.
floating-point type - afloat,double, orlong double. A floating-point number is typicallyrepresented as a mantissa and an exponent.TC++PL 4.5.
for-statement -iterationstatement specifying an initializer, an iteration condition,a "next-iteration" operation, and a controlled statement.TC++PL 6.3.3.
free store -memory allocated bynew; also calleddynamic memory.Oftenstandard library facilities, such asvector, can be used toavoidexplicit use of free store.TC++PL 6.2.6, 10.4.3, D&E 2.11.2, 11.4.2.
free() -C standard deallocationfunction. Usedelete instead.
free-standing function - afunction that is not amember function.Useful for decreasing coupling between representation andalgorithm.TC++PL 7, 18.
friend - afunction orclass explicitly granted access tomembers of a classby that class.TC++PL 11.5, C.11.4, D&E 2.10, 3.6.1-2.
friend function - afunction declared asfriend in aclass so that it has the sameaccess as the class'members without having to be within thescopeof the class. And, no, friends do not "violateencapsulation".TC++PL 11.5, 11.2.3, C.11.4, D&E 2.10, 3.6.1.
front-end - the parts of acompiler that perform lexical andsyntax checking,type checking, and initial semantic checking of atranslation unit.Typically all compiler error messages comes from the front-end.See also:back-end.D&E 3.3.
front_inserter() - returns aniterator that can be used to addelements at the frontof thecontainer .TC++PL 19.2.4.
fstream - afile stream forinput andoutput.
function - a named sequence ofstatements that can be invoked/called givenarguments and that might return avalue.Thetype of the functionincludes the number and types of argumentand the type of the value returned, if any.See also:function declaration,function body.TC++PL 2.3, 7, D&E 2.6.
function argument - anargument to afunction.
function body - the outermostblock of afunction.See also:try-block,function definition.TC++PL 2.7, 13.
function declaration -declaration of afunction, including itsname,argumenttypes,and return type.
function definition -function declaration including afunction body.
function member - seemember function.
function object -object with theapplicationoperator, operator()(), defined so that itcan be called like afunction.A function object is more general than a function because it can holddata and provide additional operations.Sometimes called afunctor.Given currentcompiler technology, simple function objects inlinebetter thanpointers to functions, so that parameterization withfunction objects can be far more efficient than use of pointersto functions orvirtual functions.See also:binder,adapter,inlining.Example.TC++PL 18.4.
function parameter - aparameter of afunction.
function prototype -C term for afunction declaration that isn't also afunction definition.D&E 2.6.
function template - seetemplate function.
function try-block -try-block associated with the outmost block of afunction, thefunction body.TC++PL 3.7.2.
functor - seefunction object.
garbage collection - techniques for reclaiming unusedmemory without relying onuser-supplieddelete or free() commands.A permitted but not required technique forC++.Commercial and free garbage collectors exist for C++: Seemy C++ page.Use ofclasses that control their own storage, such as thestandard libraryvector,string, andmap, reduces the need forgarbagecollection.See also:resource acquisition is initialization,destructor.TC++PL C.9.1. D&E 10.7.
general-purpose programming language - (1) aprogramming language intended for use in a wide range ofapplication areas without restrictions that make it totally unsuitablefor traditional major uses of computers, such as mathematicalcomputations, data processing, text processing, graphics, andcommunications.(2) a language that can do what at least as much as other languagescalled "general purpose" can do.See also:C++.
generic programming - programming usingtemplates to expressalgorithms and datastructures parameterized by datatypes, operations, and polices.See also:polymorphism,multi-paradigm programming.TC++PL 2.7, 24.4.1, D&E 15.11.2.
get function - see>>.
global data - data defined in theglobal scope. This is usually best avoided because a programmercan't easily know what code manipulates it and how. It is therefore a common sourceof errors. Globalconstants are usually ok.
global scope - thescope containing allnames defined outside anyfunction,class,ornamespace.Names in the global scope can be prefixed by ::. For example,::main().TC++PL 2.9.4.
glossary - "collection of glosses; lists and explanations of special words."- The Advanced Learners Dictionary of Current English.A pain to compile.
GNU C++ - GNU's implementation ofC++.
goto - the infamous goto. Primarily useful in machine generatedC++ code.TC++PL 6.3.4.
grammar - a systematic description of thesyntax of a language.TheC++ grammar is large and rather messy.Some of the syntactic complexity was inherited from C.TC++PL A, D&E 2.8.
GUI - Graphical UserInterface.There are manyC++ libraries and tools for building GUI-basedapplications,but nostandard C++ GUI.
handle - anobject that controls access to another. Often, a handle alsocontrols the acquisition and release ofresources.A common use is for a handle to control access to a variably-sizeddata structure.See also:resource acquisition is initialization,vector,string,smart pointer.TC++PL 25.7, D&E 11.5.2.
handle class - a smallclass that providesinterface to anobject of anotherclass. Ahandle is the standard way of providingvariable sizeddata structures inC++. Examples arestring andvector.TC++PL 25.7.
handler - seeexception handler
hash_map - hashed contained based on thestandard library framework.Not (yet) part of the standard but very common in libraries basedon the standard library.See also:map,vector, list.TC++PL 17.6.
header - seeheader file
header file -file holdingdeclarations used in more than onetranslation unit.Thus, aheader file acts as aninterface betweenseparately compiledparts of aprogram.A header file often containsinline function definitions,const definitions,enumerations, andtemplate definitions,but it cannotbe #included from for than onesource file if it contain non-inlinefunction definitions orvariable definitions.TC++PL 2.4.1, 9.2.1. D&E 2.5, 11.3.3.
hiding - seeinformation hiding
hierarchy - seeclass hierarchy.
higher-order function -functions that produce other functions.C++ does not have generalhigher-order functions, but by returningfunction objects a functioncan efficiently emulate some techniques traditionally relying ofhigher-order functions.See also:binder. TC++PL 18.4.4.
history of C++ - The work on what becameC++ started byBjarne Stroustrup inAT&TBell Labs in 1979. The first commercial release was in 1985.Standards work stared in 1990 leading to ratification of theISOstandard in 1998.TC++PL 1.4. D&E Part 1.
Hungarian notation - a coding convention that encodestype information invariablenames.Its main use is to compensate for lack oftype checking inweakly-typed or untyped languages. It is totally unsutable forC++where it complicatesmaintenance and gets in the way ofabstraction.
hybrid language - derogative term for aprogramming language that supports moreprogramming styles (paradigms) rather than justobject-oriented programming.
IDE - Integrated (or Interactive) Development Enviornment.Asoftware development environment (SDE)emphasizing aGUIinterface centered around a source code editor.There are many IDEs forC++, but no standard SDE.
identifier - seename.
if-statement -statement selecting between two alternatives based on a condition.TC++PL 6.3.2.
ifstream - anfile stream forinput.
implementation defined - an aspect ofC++'ssemantics that is defined for each implementationrather than specified in the standard for every implementation.An example is the size of anint (which must be at least 16bitsbut can be longer).Avoid implementation defined behavior whenever possible.See also:undefined.TC++PL C.2.
implementation inheritance - seeprivate base.
implicit type conversion -conversion applied implicitly based on an expectedtype and thetype of avalue.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.
in-class - lexically within thedeclaration of aclass.TC++PL 10.2.9, 10.4.6.2.
incomplete type -type that allows anobject to be copied, but not otherwise used.Apointer to an undeclared type is the typical example of anincomplete type.
inequality operator - see!=.
infix operator - abinary operator where the operator appears between the operands. For example, a+b.
information hiding - placing information where it can be accessed only througha well-definedinterface.See also:access control,abstract class,separate compilation.TC++PL 2.4.
inheritance - aderived class is said to inherit themembers of itsbase classes.TC++PL 2.6.2, 12.2, 23.4.3.1, D&E 3.5, 7.2, 12.
initialization - giving anobject an initialvalue. Initialization differs fromassignment in that there is no previous value involved.Initialization is done byconstructors.
initializer list - comma-separated list ofexpressions enclosed in curly braces, e.g.{ 1, 2, 3 } used to initialize astruct or anarray.TC++PL 5.2.1, 5.7, 11.3.3.
inline function -function declared inline using the inline keyword or by being amember function definedin-class.Compilers are encouraged to generate inline code rather thanfunction calls for inline functions.Most benefits frominlining comes with veryshort functions.TC++PL 7.1.1, 9.2, 10.2.9, D&E 2.4.1 .
inlining - seeinline function.
inserter - (1) aniostream<< (put to) function.(2) an STL operation yielding an iterator to be used for addingelements to a containter.TC++PL 19.2.4, 21.2, D&E 8.3.1.See also: extracter, back_inserter, front_inserter.
instantiation - seetemplate instantiation.
int - basic signedinteger type;its precision is implementation-defined,but an int has at least 32bits.TC++PL 2.3.1, 4.4.
integer type - ashort,int, or long.Standard C++ doesn't support long long.TC++PL 4.4.
integral type - abool,character type, orinteger type.Supports arithmetic and logical operations.TC++PL 4.1.1.
interface - a set ofdeclarations that defines how a part of aprogram can beaccessed.Thepublic members and thefriends of aclass defines that class'interface for other code to use. A class withoutdata members definesa pure interface.Theprotected members provide an additional interface for use bymembers ofderived classes.See also:abstract class.
interface function - Afunction that can access the representation of aclass.See also:friend,member function,derived class,protected.
interface inheritance - seeabstract class,public base.
invariant - a condition of the representation of anobject (the object's state)that should hold each time aninterface function is called;usually established by aconstructorTC++PL 24.3.7, E.3.5.
iostream - (1)standard library flexible, extensible,type-safeinput andoutputframework.(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.
ISO - the international standards organization. It defines and maintainsthe standards of the major non-proprietaryprogramming languages,notablyC++.
istream -inputstreamtype.TC++PL 3.6, 21.3.
istringstream - astring stream forinput.
iteration - traversal of data structure, directly or indirectly usinganiteration-statement.See also:recursion.Thestandard library offeralgorithms, such ascopy() andfind(),that can be effective alternatives toexplicit iteration.TC++PL 6.3.3. 18.
iteration-statement -for-statement,while-statement, or do-statement.
iterator - astandard libraryabstraction forobjects referring toelements of a sequence.TC++PL 3.8.1, 19.2-3.
K&R C -C as defined byKernighan andRitchie.
Kernighan - Brian Kernighan is a co-author of Kernighan &Ritchie:"TheCprogramming Language".
Koenig lookup - seeargument-based lookup.
language extension - (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 adoptedby the standard; the use of some such features implies lock-in to aparticularcompiler supplier.
learning C++ - focus onconcepts and techniques.You don't need to learn C first.See also "LearningStandard C++ as a New Language", available frommy papers page.How do I start?.TC++PL 1.2, 1.7, D&E 7.2.
Library TR - technical report from theISO C++ standards committee defining a set of new standardlibrary components, including regularexpression matching (regexp),hashedcontainers (ordered_map), andsmart pointers.Seemy C++ page.
line comment -comment started by // and terminated by end-of-line.TC++PL 6.4, D&E 3.11.1.
linkage - the process of merging code fromseparately compiledtranslation unitsinto aprogram or part of a program.TC++PL 9.
linker - the part of aC++ implementation that merge the code generated fromseparately compiledtranslation units into aprogram or part of aprogram.TC++PL 9.1, D&E 4.5, 11.3.
Liskov Substitution Principle -designclasses so that anyderived class will be acceptable whereitsbase class is.C++public bases enforce that as far as theinterface providedby the base class.TC++PL 24.3.4, D&E 2.10.
list -standard library linkedcontainer.See also:vector,map. TC++PL 3.7.3, 17.2.2.
literal - notation forvalues ofbool,character types,integer types, orfloating-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.
local class -class defined within afunction. Most often, the use of a local classis a sign that a function is too large. Beware that a local classcannot be a validtemplate argument.
local function -function defined within a function. Not supported byC++. Most often,the use of a local function is a sign that a function is too large.
locale -standard libraryclass for representing culture dependencies relatingtoinput andoutput, such as floating-point output formats,character sets, and collating rules.A locale is acontainer offacets.TC++PL 21.1, D.
long double - extended-precision floating-point number.TC++PL 4.5.
long int - integer of a size greater than or equal to the size of an int.TC++PL 4.4.
loop - astatement that expresses the notion of doing somethingzero or more times,such as afor-statement and awhile-statement.
LSP - seeLiskov Substitution Principle.
lvalue - anexpression that may appear on the left-hand side of an assignment;for example, v[7] if v is anarray or avector.An lvalue is modifiable unless it isconst.TC++PL 4.9.6, D&E 3.7.1.
macro - facility for character substitution; doesn't obeyC++scope ortype rules.C++ provides alternatives to most uses of macros;seetemplate, inline,const, andnamespace.Don't use macros unless you absolutely have to.TC++PL 7.8, D&E 2.9.2, 4.4, 18.
main() - thefunction called by the system to start aC++program.TC++PL 3.2, 6.1.7, 9.4 .
maintenance - work on aprogram after its initial release. Typical maintenanceactivitiesincludebug fixing, minor feature enhancements, porting tonew systems, improvements oferror handling, modification touse different natural languages, improvements to documentation,and performance tuning.Maintenance typically consumes more than 80% of the totaleffort and cost expended on a program.
malloc() -C standard allocationfunction. Usenew orvector instead.
map -standard library associativecontainer, based on "less than" ordering.See also:hash_map,vector, list.TC++PL 3.7.4, 17.4.1.
Max Munch - (1) mythical participant in theC++ standards process. (2) therule that says that while parsing C++ always chooses the lexicallyor syntactically longest alternative. Thus ++ is theincrement operation, not two additions, andlong int is a singleinteger type rather than the long integer followed by an int.Cross references in thisglossary follow this rule.
member -type,variable,constant, orfunction declared in thescope of aclass.TC++PL 5.7, 10.2, D&E 2.3, 2.5.2, 2.11.
member class - aclass that is amember of another; also called anested class.TC++PL 11.12, D&E 3.12, 13.5.
member constant -const orenumeration declared as amember. If initializedin-class,such aconstant can be used inconstant expressions within the class.TC++PL 10.4.6.2.
member data - seedata member.
member function - afunction declared in thescope of aclass. Amember function thatis not astatic member function must be called for anobjectof its class.TC++PL 10.2.1, D&E 2.3, 3.5.
member initializer - initializer for amember specified in theconstructor for itsclass.TC++PL 10.4.6, 12.2.2, D&E 12.9.
member type -member class, memberenumeration, or membertypedef.
memberwise copy - copying aclassobject by copying each of itsmembers in turn, usingpropercopy constructors orcopy assignments. That's the defaultmeaning of copy.TC++PL 10.4.4.1, 10.4.6.3, D&E 11.4.4.
memory -static memory,stack, orfree store.
memory management - a way of allocating and freeingmemory. InC++ memory is eitherstatic, allocated on thestack, or allocated on thefree store.When people talk about memory management, they usually think offree store or even specifically aboutgarbage collection.Memory can often be effectively managed throughstandard librarycontainers, such asvector orstring,or through generalresource management techniques.See also:auto_ptr,constructor,destructor,resource acquisition is initialization.TC++PL C.9, D&E 3.9, 10.
mem_fun() - anadapter that allows amember function to be used as anargument toa standardalgorithm requiring afree-standing function. TC++PL 18.4.4.2.
method - seevirtual member function.
Microsoft C++ - seeVisual C++
modifiable lvalue -lvalue that is notconst.TC++PL 4.9.6.
most-derived type - thetype used to create anobject (before anyconversions).See also:dynamic type,static type.
multi-method - avirtualfunction that selects the function to be called basedon more than one operand.See also:multiple dispatch.D&E 13.8.
multi-paradigm design -design focussed on applying the variousparadigms to their bestadvantage.See also:multi-paradigm programming.
multi-paradigm programming - programming applying different styles of programming, such asobject-oriented programming andgeneric programming where theyare most appropriate.In particular, programming using combinations of differentprogramming styles (paradigms) to express code more clearly thanis possible using only one style.See also:C++.
multimap -map that allows multiplevalues for a key.TC++PL 17.4.2.
multiple dispatch - the generalization ofdouble dispatch to more operands.See also:single dispatch.
multiple inheritance - the use of more than one immediatebase class for aderived class.One typical use is to have one base define aninterface and anotherproviding help for the implementation.TC++PL 12.2.4, 12.4, 15.2.5, D&E 12.
mutable - an attribute of amember that makes it possible to change itsvalueeven if itsobject is declared to beconstTC++PL 10.2.7.2, D&E 13.3.3.
name - sequence of letters and digits started by a letter, usedto identify ("name") user-defined entities inprogram text.An underscore is considered a letter.Names are case sensitive.The standard imposes no upper limit on the length of names.TC++PL 4.9.3.
namespace - a namedscope.TC++PL 2.5.1, 8.1, C.10. D&E 17.
namespace alias - alternativename for anamespace; often a shorter name.TC++PL 8.2.7, D&E 17.4.3.
NCITS - National Committee for Information Technology Standards.The part ofANSI that dealswithprogramming language standards, notablyC++, and sells copiesof theC++ standard. Formerly known as X3.
nested class - seemember class.
nested function - seelocal function.
new -object creationoperator.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.
new-style cast -dynamic_cast,static_cast,const_cast, orreinterpret_cast.D&E 14.3.
new_handler - a (possibly user-defined)function called bynew ifoperator new() fails to allocate sufficientmemory. See also: std::bad_allocexception.TC++PL 6.2.6.2, 14.4.5., 19.4.5.
non-static member -member of aclass that is not declared to be astatic member.Anobject of a class has its own space for each non-staticdata member.
not - synonym for !, the logical negationoperatorTC++PL C.3.1.
nothrow guarantee - the guarantee that an operation will notthrow anexception.See alsoexception safety,basic guarantee, andstrong guarantee.TC++PL E.2.
NULL -zero. 0. 0 is an integer. 0 can be implicitly converted to everypointertype.See also:nullptr.TC++PL 5.1.1, D&E 11.2.3.
nullptr -C++0x keyword for thenullpointer. It is not an integer.It can be assigned only to pointers.
object - (1) a contiguous region ofmemory holding avalue of sometype.(2) a named or unnamedvariable of some type; an object of a typewith aconstructor is not considered an object before the constructorhas completed and is no longer considered an object once adestructorhas started executing for it. Objects can be allocated instatic memory, on thestack, on on thefree store.TC++PL 4.9.6, 10.4, 10.4.3, D&E 2.3, 3.9.
object code - seeobject file.
object file - the result of compiling asource file.See also:compiler.
object-oriented design -design focussed onobjects andobject-oriented programming.TC++PL 23.2, D&E 7.2.
object-oriented programming - programming usingclass hierarchies andvirtualfunctions to allowmanipulation ofobjects of a variety oftypes through well-definedinterfaces and allow a program to be extended incrementally throughderivation.See also:polymorphism,data abstraction.TC++PL 2.6, 12, D&E 3.5, 7.2.
object-oriented programming language - aprogramming language designed to support or enforce some notionofobject-oriented programming.C++ supportsOOP and other effective forms of programming, but doesnot try to enforce a single style of programming.See also:generic programming,multi-paradigm programming,hybrid language.
ODR - seeone definition rule
ofstream - anfile stream foroutput.
old-style cast - seeC-style cast.
one definition rule - there must be exactly onedefinition of each entity in aprogram.If more than one definition appears, say because of replication throughheader files, the meaning of all such duplicates must be identical.TC++PL 9.2.3, D&E 2.5, 15.10.2.
OOD - seeobject-oriented design.
OOP - seeobject-oriented programming.
OOPL - seeobject-oriented programming language.
operator - conventional notation for built-in operation, such as +, *, and &.A programmer can define meanings for operators foruser-defined types.See also:operator overloading,unary operator,binary operator,ternary operator,prefix operator,postfix operator.TC++PL 6.2.
operator delete() - deallocationfunction used bydelete#. Possibly defined by user.TC++PL 6.2.6.2, 19.4.5.See also:operator new().
operator delete[]() - deallocationfunction used bydelete#. Possibly defined by user.TC++PL 6.2.6.2, 19.4.5.See also:operator new[]().
operator function -function defining one of the standardoperators; e.g. operator+().See also: operator,operator overloading,conversion operator.
operator new() - allocationfunction used bynew. Possibly defined by user.TC++PL 6.2.6.2, 19.4.5.See also:operator delete().
operator new[]() - allocationfunction used bynew. Possibly defined by user.TC++PL 6.2.6.2, 19.4.5.See also:operator delete[]().
operator overloading - having more than oneoperator with the samename in the samescope.Built-in operators, such as + and *, are overloaded fortypes such asint andfloat. Users can define their own additional meanings foruser-defined types. It is not possible to define new operators orto give new meanings to operators forbuilt-in types.Thecompiler picks the operator to be used based onargument typesbasedoverload resolution rules.See also: overload resolution.TC++PL 6.2, D&E 3.6, 11.7.1.
optimizer - a part of acompiler that eliminates redundant operations fromcode and adjusts code to perform better on a given computer.See also,front-end,back-end,code generator.D&E 3.3.3.
or - synonym for ||, the logical oroperatorTC++PL C.3.1.
order of construction - aclassobject is constructed from the bottom up: first basesindeclaration order, thenmembers in declaration order, andfinally the body of theconstructor 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.
order of destruction - aclassobject is destroyed in the reverseorder of construction.See also:destructor.
ostream -outputstreamtype.TC++PL 3.4, 21.2.
ostringstream - astring stream foroutput.
out_of_range - standardexception thrown byvector if anargument to at() is outof range.TC++PL 16.3.3.
overload - seeoverloading.
overload resolution - a set of rules for selecting the best version of anoperator basedon thetypes of its operands.A set of rules for selecting the best version of an overloadedfunction based on the types of itsarguments.The intent of the overload resolution rules is to reject ambiguoususes and to select the simplest function or operator for each use.TC++PL 6.2, D&E 11.2.
overloaded function - seeoverloading.
overloaded operator - seeoperator overloading
overloading - having more than onefunction with the samename in the samescope orhaving more than oneoperator with the same name in the same scope.It is not possible tooverload across different scopes.See also:using-declaration.TC++PL 6.2, D&E 3.6, 11.2.
override - seeoverriding.
overriding - declaring afunction in aderived class with the samename and amatchingtype as avirtual function in abase class.Theargument types must match exactly.The return types must match exactly or be co-variant.The overriding function will be invoked when the virtual functionis called.TC++PL 15.6.2, 6.2, D&E 3.5.2-3, 13.7.
paradigm - pretentious and overused term for a way of thinking.Often used with the erroneous assumption that "paradigms" aremutually exclusive, and often assuming that one paradigm is inherentlysuperior to all others. Derived from Kuhn's theory of science.TC++PL 2.2.
parameter - avariable declared in afunction ortemplates for representing anargument.Also called a formal argument. Similarly, for templates.
partial specialization - atemplate used (only) for the subset of itstemplate parametersthat matches aspecialization pattern.TC++PL 13.5.
Performance TR - technical report from theISO C++ standards committee discussing issues relatedto perfoemance, especially as concerns embedded systems programming and hardware access.Seemy C++ page.
placement delete - Seeexplicit call of destructor.
placement new - a version of thenewoperator where the user can addarguments toguide allocation. The simplest form, where theobject is placedin a specific location, is supported by thestandard library.Example.For example, placement new is used in the implementationof standard librarycontainers.See also:explicit call of destructor.TC++PL 10.4.11, E.3.1, D&E 10.4.
POD - "Plain Old Data" - (roughly) aclass that doesn't containdata membersthat would be illegal inC. A POD can therefore be used for data thatneeds to be share with Cfunctions.A POD can have non-virtual member functions.
pointer - anobject holding anaddress or 0.TC++PL 2.3.3, 5.1, D&E 9.2.2.1, 11.4.4.
policy object - anobject used to specify guide decisions (e.g. the meaning of"less than") or implementation details (e.g. how to accessmemory)for an object or analgorithm.See alsotrait,facet.TC++PL 13.4, 24.4.1.
polymorphism - providing a singleinterface to entities of differenttypes.virtualfunctions provide dynamic (run-time) polymorphism throughan interface provided by abase class.Overloaded functions andtemplates providestatic (compile-time) polymorphism.TC++PL 12.2.6, 13.6.1, D&E 2.9.
postfix operator - aunary operator that appears after its operand. For example var++.
prefix operator - a unary operato that appears before its operand. For example, &var.
preprocessor - the part of aC++ implementation that removescomments, performsmacro substitution and#includes. Avoid using the preprocessorwhenever possible.See also: macro, #include, inline,const,template,namespace.TC++PL 7.8, 9.2.1, D&E 18.
priority_queue -standard libraryqueue where a priority determines the order in whichanelement reaches the head of the queue. TC++PL 17.3.3.
private -access control keyword. Seeprivate member,private base.
private base - abase class declaredprivate in aderived class, so that the base'spublic members are accessible only from that derived class.TC++PL 15.3.2, D&E 2.10.
private member - amember accessible only from its ownclass.TC++PL 2.5.2, 10.2.2, 15.3, D&E 2.10.
procedural programming - programming usingprocedures (functions) and data structures (structs).See also:data abstraction,object-oriented programming,generic programming,multi-paradigm programming.TC++PL 2.3.
program - a set oftranslation units complete enough to be made executable byalinker.TC++PL 9.4.
programming language - artificial language for expressingconcepts and generalalgorithmsin a way that lends itself to solving problems using computers.There do not appear to be a general consensus on what a programminglanguage is or should be.TC++PL 1.3.2, 2.1-2, D&E page 7.
prohibiting operations - operations can be rendered inaccessible by declaring themprivate;in this way default operations, such as construction, destruction,and copying can be disallowed for aclass.TC++PL 11.2.2, D&E 11.4.
proprietary language - language owned by an organization that is not an officialstandards organization, such asISO; usually manipulated by itsowner for commercial advantage.
protected -access control keyword. Seeprotected member,protected base.
protected base - abase class declaredprotected in aderived class, so that thebase'spublic andprotected members are accessible only in thatderived class and classes derived from that.TC++PL 15.3.2, D&E 13.9.
protected member - amember accessible only fromclasses derived from its class.TC++PL 15.3.1, D&E 13.9.
protection - seeencapsulation.
protection model - the mechanisms foraccess control.Seepublic,private,protected,friend.TC++PL 15.3, D&E 2.10.
public -access control keyword. Seepublic member,public base.
public base - abase class declaredpublic in aderived class, so that thebase'spublic members are accessible to the users of that derivedclass.TC++PL 15.3.2, D&E 2.3.
public member - amember accessible to all users of aclass.TC++PL 2.5.2, 10.2.2, 15.3, D&E 2.10.
pure object-oriented language -programming language claiming to support onlyobject-oriented programming.C++ is designed to support several programmingparadigms, includingtraditional C-style programming,data abstraction,object-oriented programming, andgeneric programming.For a longer explanation, readWhy C++ isn't just an object-oriented programming language.See also:hybrid language.
pure virtual function -virtualfunction that must be overridden in aderived class.Indicated by the curious=0syntax. A pure virtual functioncan be defined in the class where it is declared pure, butneedn't be and usually isn't. A class with at least onepure virtual function is anabstract class.TC++PL 12.3. D&E 13.2.1.
push_back() -member function that adds anelement at the end of a standardcontainer, such asvector, thereby increasing the container's sizeby one.Example.TC++PL 3.7.3, 16.3.5, E.3.4.
put function - see<<.
qualified name -name qualified by the name of its enclosingclass ornamespace usingthescope resolutionoperator ::. 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.
queue -standard library first-in-first-out sequence.TC++PL 17.3.2.
RAII - seeresource acquisition is initialization.
random number generator -function orfunction object producing a series of pseudorandom numbersaccording to some distribution.TC++PL 22.7.
raw memory - seeuninitialized memory.
realloc() -C standard allocationfunction. Usevector andpush_back() instead.
recursion - afunction calling itself, hopefully with differentargumentsso that the recursion eventually ends with a call for whichthe function doesn't call itself.See also:iteration.TC++PL 7.1.1.
reference - an alternativename for anobject or afunction.See also:operator overloading,call-by-reference.TC++PL 5.4.1, D&E 3.7.
regression testing - systematically checking that a new version of aprogram doesn't break correct usesof a previous version of the program.
reinterpret_cast - atype conversion operation that reinterprets theraw memory ofanobject as avalue of another type.The result of a reinterpret_cast can only be portably used after beingconverted back into its original type.Use only as a last resort.See also: cast.TC++PL 6.2.7, D&E 14.3.3.
resource - any entity that aprogram acquires and releases. Typical examples arefree store,filehandles, 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.
resource acquisition is initialization - A simple technique for handlingresources inprograms usingexceptions.One of the keys toexception safety.Example.TC++PL 14.4, E.3 D&E 16.5.
resource leak - programming error causing aresource not to be released.See also:resource acquisition is initialization,basic guarantee.TC++PL 14.4, E.2-3 D&E 16.5.
resource management - a way of acquiring and releasing aresource, such asmemory, thread,orfile.See also:resource acquisition is initialization,auto_ptr,vector.TC++PL 14.4, D&E 10.4.
resumption semantics - In some languages, but notC++,anexception handler can respond by telling thethrower 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 tocontorted code because of unfortunate dependencies between separatelevels ofabstraction.See also:termination semantics.TC++PL 14.4.5, D&E 16.6.
return type relaxation - Allowing avirtualfunction returning a B* or a B& to be overriddenby a function with a returntype D* or D&, provided B is apublic base of D.See also:overriding.TC++PL 15.6.2, D&E 13.7.
reverse iterator -iterator for iterating through a sequence in reverse order.TC++PL 19.2.5.
Ritchie - Dennis Ritchie is the designer and original implementer ofC.Co-author ofKernighan & Ritchie: "The Cprogramming Language".
RTFM - "Read The Manual" (The 'F' is silent). Usually a very good idea.
RTTI - seeRun Time Type Information.
run time type information - information about atype available at run time through operations onanobject of that type. See also:dynamic_cast,typeid(), andtype_info.TC++PL 15.4, D&E 14.2.
rvalue - anexpression 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.
scope - a region of source text delimited by curly braces: { ... },a list offunction ortemplate parameters, orall of atranslation unit outside other scopes.See also:block,namespace,global scope.TC++PL 2.9.4.
SDE -Software Development Environment. An environment of editors,compilers, tools, libraries, etc.used by a programmer to produce software.There are many SDEs forC++, but no standard SDE.
selection-statement -if-statement orswitch-statement.TC++PL 6.3.2.
semantics - the rules specifying the meaning of a syntactically correct constructof aprogram. For example, specifying the actions taken to performafor-statement or anobject definition.
separate compilation - the practice of compiling parts of aprogram, calledtranslation units,separately and then later linking the results together using alinker.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.
separately compiled - seeseparate compilation.
sequence adapter - aclass that provides a modifiedinterface to another.For example, astandard librarystack is anadapter for a moreflexible data structure such as avector.See also: adapter, stack,queue,priority_queue.TC++PL 17.3.
set -standard library associativecontainer
short - integer of a size less than or equal to the size of an int.TC++PL 4.4.
sibling class - twoclasses 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 immediatederived class(I didn't want to introduce a notion of "cousin classes").See also:dynamic_cast,crosscast.
signature - the set ofparametertypes for afunction;that is, the function's type ignoring its return type.This is a confusingly specialized definition compared to otherprogramming languageswhere "signature" means "function type".
Simula - ancestor ofC++ designed by Ole-Johan Dahl and Kristen Nygaard;the source of the C++classconcept.TC++PL 1.4, 2.6.2, D&E 1.1, 3.1.
single dispatch - the technique of choosing themember function to be invoked basedon theobject used in the call.See also:double dispatch.
size of an object - the number ofbytes required to represent anobject.See alsosizeof,alignment.TC++PL 4.6.
sizeof -operator yielding thesize of an object.
smart pointer -user-defined type providingoperators like afunction, such as *and ++, and with asemantics similar topointers.See also:iterator.Sometimes smart a pointer is called ahandle.TC++PL 11.10-11, 13.6.3.1, 19.3, 25.7, D&E 11.5.1
software - acollection ofprograms
sort() -standard libraryalgorithm for sorting a random access sequence, suchas avector or anarray.Example comparing sort() to qsort().TC++PL 18.7.1.
source file -.c file orheader.
specialization - aclass orfunction generated from atemplate by supplying acomplete set oftemplate arguments.TC++PL 13.2.2, 13.5, D&E 15.10.3.
stack - (1)memory used to hold localvariables for afunction.(2)standard library first-in-last-out sequence.TC++PL 10.4.3, 17.3.1, D&E 2.3, 3.9.
Standard C++ -C++ as defined byISO.
standard header -header forstandard library facility.Included using the "#include< ... >" syntax. TC++PL 9.2.2, 16.1.2.
standard library - The library defined in theC++ standard.Containsstrings,stream I/O, a framework ofcontainers andalgorithms,support for numerical computation, support for internationalization,theC standard library, and some language support facilities.See also:complex,valarray,locale.TC++PL 16-22, D, E.
standards committee - seeC++ standards committees.
statement - the basic unit controlling the execution flow in afunction,such asif-statement,while-statement, do-statement,switch-statement,expression statement, anddeclaration.TC++PL 6.3.
static - (1) keyword used to declare aclassmember static;meaning allocated instatic memory.For amember function, this implies that there is no thispointer.(2) keyword used to specify that a localvariable shouldbe allocated in static memory.(3) deprecated: keyword used to specify that a globalname shouldnot be visible from othertranslation units.TC++PL 7.1.2, 10.2.4, 10.4.8-9.
static member -member of aclass for which there is only one copy for the wholeprogram rather than one perobject.TC++PL 10.2.4, D&E 13.4.
static member function - amember function that need not be called for anobject of theclass. TC++PL 10.2.4, D&E 13.4.
static memory -memory allocated by thelinker.TC++PL 10.4.3, D&E 2.3, 2.11.1, 3.9, 11.4.2.
static type - thetype of anobject as known to thecompiler based on itsdeclaration.See also:dynamic type.
static type safety -type safety enforced before aprogram starts executing (at compile time or atstaticlink time).
static variable -variable allocated instatic memory.TC++PL 7.1.2, 10.2.4, 10.4.3, D&E 3.9.
static_cast - atype conversion operation that converts between related types,such aspointer types within aclasshierarchy and betweenenumerations andintegral types.See also:cast,dynamic_cast.TC++PL 6.2.7, 15.4.2.1, D&E 14.3.2.
Stepanov - Alex Stepanov is the original designer and implementer of theSTL.D&E 11.15.2.
STL - the "StandardTemplate Library" by AlexStepanov, which became thebasis for thecontainers,algorithms, anditerators part of theISO C++ standard library.TC++PL 15-19.
strcmp() - aC-stylestandard libraryfunction for comparingC-style strings.
stream I/O - seeiostream.
string - standard-librarytype representing a sequence of characters,support by convenientoperators, such as== and+=.The general form of of strings,basic_string, supports strings ofdifferent kinds of characters.TC++PL 3.5, 20.
string stream -stream attached to astring.See also,stringstream,istringstream,ostringstream.TC++PL 21.5.3.
stringstream - astring stream forinput andoutput.
strong guarantee - the guarantee that anexception thrown by an operation leaves everyobject in the state in which it was before the start of the operation.Builds on thebasic guarantee.See alsoexception safety,nothrow guarantee, and basic guarantee.TC++PL E.2.
Stroustrup - seeBjarne Stroustrup.
strstream - deprecated ancestor ofstringstream.
struct -class withmemberspublic by default.Most often used for data structures withoutmember functions orclassinvariants, as inC-style programming.TC++PL 5.7, 10.2.8, D&E 3.5.1.
subtype - seederived class. See also:public base.
suffix operator - apostfix operator.
superclass - abase class.
switch-statement -statement selecting among many alternatives based on an integervalue.TC++PL 6.3.2.
syntax - the set of gramatical rules specifying how the text of aprogrammust be composed. For example, specifying the form of adeclarationor the form of afor-statement.
TC++PL -Bjarne Stroustrup:The C++ Programming Language (Special Edition).Addison Wesley. 2000.
template -class orfunction parameterized by a set oftypes,values,or templates.See alsotemplate instantiation,specialization,template class,template function.TC++PL 2.7, 13, D&E 15.
template argument - anargument to atemplate.
template argument constraint - seeconstraint.
template class -class parameterized bytypes,values, ortemplates.Thetemplate arguments necessary to identify the class to be generatedfor theclass template must be provided where a template class is used.For example "vector<int> v;" generates a vector of ints from thevector template.See also template.TC++PL 13.2, D&E 15.3.
template definition -declaration of atemplate class or of atemplate function includingafunction body.
template function -function parameterized bytypes,values, ortemplates.The function to be generated from a template function can usuallybe deduced from thefunction arguments in a call.For example, "sort(b,e)" generates "sort<vector::iterator>(b,e)"from the sort() template function if b and e are standard libraryvector iterators.If a template argument cannot be deduced, it must be providedthrough explicit qualification.See also template.TC++PL 13,3, D&E 15.6.
template instantiation - the process of creating aspecialization from atemplate.TC++PL 13.2.2, D&E 15.10.
template parameter - aparameter of atemplate.
terminate() - If anexception is thrown but nohandler is found, terminate()is called. By default, terminate() terminates theprogram.If program termination is unacceptable, a user can provide analternative terminate()function.If you are worried aboutuncaught exceptions, make the body ofmain()atry-block. TC++PL 14.7.
termination semantics - a somewhat ominous terminology for the idea that throwing anexception"terminates" an operation and returns through thefunction callchain to ahandler.The handler can initiate anyerror handling it likes, including callingthe function that caused the exception again (presumably after fixingthe 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 theblock/functionthat threw and all blocks/functions that led to it from the handler'stry-block.See also:resumption semantics.TC++PL 14.4.5, D&E 16.6.
ternary operator - anoperator taking three operands, such as ?:.
testing - systematically verifying that aprogram meets its specification and systematicallysearching for error.
this -pointer to theobject for which anon-static member function is called.TC++PL 10.2.7, D&E 2.5.2.
throw - operation for interrupting the normal flow of control and returningto an appropriateexception handler identifyed by thetype of theexception throw.See also:catch,exception handling.TC++PL 8.3.1, 14.3, D&E 16.3.
trait - a smallpolicy object, typically used to describe aspects of atype.For example,iterator_trait translation unit - a part of aprogram that can beseparately compiled.TC++PL 9.1. trigraph - alternative representation forC++ representation characters thatdoesn't exist in every nationalcharacter set, such as {, }, [, ],and #: ??<, ??>, ??(, ??), and ??=.TC++PL C.3.1. true -boolvalue; converts to 1.TC++PL 4.2, D&E 11.7.2. try - keyword used to start atry-block. try-block - ablock, prefixed by the keywordtry, specifyinghandlers forexceptions.See also:catch,exception handling.TC++PL 8.3.1,14.3, D&E 16.3. two-phase lookup - a somewhat complicated mechanism used in compilation oftemplates.Names that do not dependon atemplate parameter are looked up (and bound) early,i.e., when the templatetemplate definition is first seen ("phase 1 lookup").Names that depend on a template parameter are looked up late, i.e. during templateinstantiation ("phase 2 lookup") so that the lookup can find names relating to actualtemplate arguments.TC++PL C::13.8. type - abuilt-in type or auser-defined type.A type defines the proper use of aname or anexpression.TC++PL 2.3.1, 4.1. type checking - the process of checking that everyexpression is used accordingto itstype.thecompiler checks every expression based on the declared types ofthenames involved.TC++PL 7.2-3, 24.2.3, D&E 2.3, 2.6, 3.10, 3.15, 9.2.2.1. type conversion - producing avalue of onetype from a value of another type.A typeconversion can be an implicit conversion oranexplicit conversion.See also:user-defined type conversion,cast.TC++PL 6.2.7. type safety - the property that anobject can be accessed only according to itsdefinition.C++ approximates this ideal. A programmer can violatetype safety by explicitly using acast, by using an uninitializedvariable, byusing apointer that doesn't point to an object, by accessing beyondthe end of anarray, and by misusing aunion. For low-level systemscode, it can be necessary to violate type safety (e.g. to write outthebyte representation of some objects), but generally type safetymust be preserved for a program to be correct and maintainable. type system - the set of rules for howobjects can be used according to theirtypes.See also:type checking. typedef - synonym for sometype declared using the keywordtypedef. typeid() -operator returning basictype information.TC++PL 15.4.4, D&E 14.2.5. typename - (1) an alternative to "class" when declaringtemplate arguments;for example, "template<typename T> void f(T);"(2) a way of telling a compiler that a name is meant to name a type in templatecode; for example "template<class T> void f(T a) { typename T::diff_type x = 0; ... }".TC++PL C::13.5. type_info -class containing basicrun time type information.TC++PL 15.4.4, D&E 14.2.5.1. unary operator - anoperator taking one operand, such as ! and unary *. uncaught exception -Exception for which nohandler was found. Invokesterminate(), whichby default terminates theprogram.TC++PL 14.7. undefined - an aspect ofC++'ssemantics for which no reasonable behavior isrequired. An example is dereferencing apointer with thevaluezero.Avoid undefined behavior.See also:implementation defined.TC++PL C.2. uninitialized memory -memory that hasn't been initialized to hold a specificvalue of atype.TC++PL 19.4.4. union - astruct with allmembers allocated at the same offset within anobject.The language does not guaranteetype safety for all uses of unions.Primarily used to save space.TC++PL C.8.2. upcast - acast from aderived class to one of its bases.See also:downcast,crosscast.TC++PL 15.4. user-defined type -Class orenumeration.A programmer can define meanings foroperators for user-definedtypes.See also:operator overloading.TC++PL 6.2, 11, D&E 3.6, 11.7.1. user-defined type conversion - a user can defineconversions either asconstructors orconversion operators.These conversions are applied explicitly or implicitly just likebuilt-in conversions. TC++PL 11.3.5, 11.4, D&E 3.6.1, 3.6.3. using - seeusing-directive andusing-declaration. using-declaration -declaration of a local synonym for aname in anothernamespaceorclass.Example of using-declaration used to simplify overloading.See also: overloading,argument-based lookup.TC++PL 8.2.2. D&E 17.4. using-directive - directive making anamespace accessible.See also:argument-based lookup.TC++PL 8.2.3. D&E 17.4. valarray -standard library numericvectortype supporting vector operations.TC++PL 22.4. value - thebits of anobject interpreted according to the objectstype. value return - Thesemantics offunction return is to pass a copy of the returnvalue. The copy operation is defined by the returntype'scopy constructor.TC++PL 7.4. variable - namedobject in ascope.TC++PL 2.3.1, 10.4.3, D&E 2.3. variable definition -declaration of a namedobject of a datatype without anextern specifier. vector -standard librarytemplate providing contiguous storage, re-sizingand the usefulpush_back()functions for addingelements at the end.Vector is the defaultcontainer.See also:map,multimap, list,deque.TC++PL 3.7.1, 16.3. virtual - keyword used to declare amember function virtual. virtual base - a base that is shared by allclasses in aclass hierarchy that hasdeclared itvirtual.TC++PL 15.2.4, D&E 12.3, 12.4.1. virtual constructor - aconstructor cannot bevirtual, because to create anobject, weneed complete information of itstype. "virtual constructor" is thename of a technique for calling a virtualfunction to create anobject of an appropriate type.Example.TC++PL 12.4.4, 15.6.2. virtual destructor - adestructor declaredvirtual to ensure that the properderived class destructoris called if anobject of a derived class is deleted through apointer to abase class. If a class has any virtualfunctions,it should have a virtual destructor.Example.TC++PL 12.4.2, D&E 10.5. virtual member function - amember function that aderived class canoverride;the primary mechanism for run-timepolymorphism inC++.Avirtual member function is sometimes called amethod.See also:overriding,pure virtual function.TC++PL 2.5.4, 2.5.5, 12.2.6, D&E 3.5, 12.4. virtual-function pointer - apointer to aclass'virtualfunction table. virtual-function table - table of allvirtualfunctions for aclass. The most common wayof implementing virtual functions is to have eachobject of aclass with virtual functions contain a virtual functionpointerpointing to the class' virtual function table. visitor pattern - a way of usingdouble dispatch to simulatevirtual calls withoutadding new virtualfunctions. Visual C++ - Microsoft's implementation ofC++ together with proprietary librariesfor Windows programming in anIDE. void - a keyword used to indicate an absence of information.TC++PL 4.1.1, 4.7. void* -pointer tovoid; that is, a pointer to anobject of unknowntype;also called pointer toraw memory.A void* cannot be used or assigned without acast.TC++PL 5.6, D&E 11.2.1, 11.2.3. volatile - attribute of adeclaration telling thecompiler that an entitycan have itsvalue changed by extralinguistic means; for example,a real time clock: "extern volatileconst long clock;".Limits optimizations.TC++PL A.7.1. vptr - seevirtual-function pointer. vtbl - seevirtual-function table. wchar_t - widecharacter type. Used to hold characters ofcharacter sets thatrequire more than abyte to represent, such as unicode.TC++PL 4.3, C.3.3.See also: large character sets, universal charactername. WG21 - a common abbreviation of thename of theISO C++ standards committee. while-statement - aloopstatement presenting its condition "at the top".For example, while (cin>>var) vec.push_back(var); whitespace - 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'). word - a number ofbytes that on a given machine is particularlysuied to holding an integers or apointer. On many machines, anobjectmust 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. xor - synonym for ^, the bitwise exclusive oroperatorTC++PL C.3.1.
[8]ページ先頭