Index[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [Z] C library header C with classes C++ calling C function from C++ compiling C and C++ using C linkage C-style cast C-style string 2nd 3rd 4th 5th and char* and string literal compared to string 2nd definition dynamically allocated initialization parameter pitfalls with generic programs c_str example CachedObj add_to_freelist allocation explained definition definition of static members design illustration inheriting from operator delete operator new call operator (()) 2nd 3rd 4th execution flow overloaded operator calling C function from C++ candidate function 2nd and function templates namespaces overloaded operator capacity string vector case label 2nd 3rd default cassert header cast 2nd checked [See dynamic_cast] old-style catch clause 2nd 3rd 4th 5th catch(...) 2nd example exception specifier matching ordering of parameter category, iterator cctype 2nd header cerr 2nd char literal char string literal [See string literal] character newline (\n) nonprintable 2nd null (\0) printable tab (\t) checked cast [See dynamic_cast] CheckedPtr children's story program revisited cin 2nd by default tied to cout cl class 2nd 3rd 4th 5th abstract base example access labels 2nd as friend 2nd 3rd [See base class] concrete conversion multiple conversions lead to ambiguities conversion constructor function matching with standard conversion data member 2nd const vs. mutable const, initialization constraints on type definition initialization mutable reference, initialization static data member definition default access label default inheritance access label definition 2nd and header 2nd 2nd 3rd [See derived class] destructor definition direct base [See immediate base class] explicit constructor forward declaration generic handle 2nd 2nd [See handle class] immediate base 2nd indirect base 2nd local [See local class] member 2nd 3rd member access 2nd [See member function] member: constant expression [See bit-field] multiple inheritance [See multiple base class] nested [See nested class] nonvirtual function, calls resolved at compile time operator delete [See member operator] operator new [See member operator new] pointer member copy control copy control strategies default copy behavior pointer to member definition pointer to member function, definition preventing copies private member private member inheritance protected member public member 2nd inheritance static member 2nd as default argument data member as constant expression example inheritance template member [See member template] type member undefined member user 2nd virtual base virtual function, calls resolved at run time class declaration 2nd of derived class class derivation list 2nd access control default access label multiple base classes virtual base class keyword class member: constant expression [See bit-field] class scope 2nd 3rd friend declaration inheritance member definition name lookup static members virtual functions class template 2nd 3rd 4th [See also template parameter, template argument, instantiation] compiler error detection declaration definition error detection explicit template argument export friend declaration dependencies explicit template instantiation nontemplate class or function template class or function member function defined outside class body instantiation member specialization member template [See member template] nontype template parameter static member accessed through an instantiation definition type includes template argument(s) 2nd type-dependent code uses of template parameter class template specialization definition member defined outside class body member, declaration namespaces class type 2nd 3rd 4th 5th 6th class member default initialization conversion design considerations example initialization of multiple conversions lead to ambiguities object definition operator 2nd 3rd operator and function matching parameter and overloaded operator used implicitly variable vs. function declaration with standard conversion class, keyword compared to typename in template parameter in variable definition cleanup, object [See destructor] clear 2nd associative container example 2nd sequential container clog 2nd close comma operator (,) 2nd example operand order of evaluation overloaded operator comment 2nd block (/* */) 2nd single-line (//) 2nd compare plain function string template version instantiatied with pointer specialization compilation and header conditional inclusion model for templates needed when class changes needed when inline function changes separate 2nd of templates separate model for templates compiler extension flag for inclusion compilation model GNU Microsoft template errors diagnosed at link time compiler extension compiling C and C++ composition vs. inheritance compound assignment (e.g.,+=) 2nd 3rd bitwise operator iterator overloaded operator 2nd Sales_item string compound expression 2nd compound statement 2nd compound type 2nd 3rd compute overloaded version concatenation Screen operations string string literal concrete class initialization condition 2nd and conversion assignment in in do while statement in for statement 2nd in if statement 2nd in logical operator in while statement stream type as 2nd 3rd string input operation as condition state 2nd conditional compilation conditional operator (?:) 2nd operand order of evaluation console window const and dynamically allocated array conversion to 2nd and template argument iterator vs. const_iterator object scope 2nd overloading and 2nd parameter pointer reference initialization const data member compared to mutable initialization static data member const member function 2nd 3rd 4th 5th const object, constructor const pointer [See also pointer to const] conversion from nonconst const reference argument conversion from nonconst parameter overloading return type const void* 2nd const_cast 2nd const_iterator 2nd compared to const iterator container const_reference const_reverse_iterator container constant expression 2nd and header file array index bit-field enumerator nontype template parameter static data member construction, order of 2nd derived objects 2nd multiple base classes virtual base classes constructor 2nd 3rd 4th 5th 6th const objects conversion 2nd function matching with standard conversion copy 2nd base from derived multiple inheritance default 2nd 3rd 4th 5th 6th default argument in derived class initializes immediate base class initializes virtual base execution flow explicit 2nd copy-initialization for associative container for sequential container function matching function try block in constructor initializer list inheritance initializer may not be virtual object creation order of construction derived objects 2nd multiple base classes virtual base classes overloaded pair resource allocation synthesized copy 2nd synthesized default 2nd 3rd 4th virtual inheritance with standard conversion constructor initializer list 2nd 3rd 4th 5th compared to assignment derived classes function try block initializers multiple base classes sometimes required virtual base class container 2nd 3rd 4th [See also sequential container, associative container] and generic algorithms as element type assignment (=) associative 2nd begin clear const_iterator const_reference const_reverse_iterator element type constraints 2nd elements and destructor elements are copies empty end erase has bidirectional iterator inheritance insert iterator rbegin 2nd reference rend 2nd returning a reverse_iterator 2nd sequential 2nd size size_type supports relational operators swap types defined by continue statement 2nd example control, flow of 2nd conversion 2nd ambiguous and assignment argument with class type conversion arithmetic type 2nd array to pointer 2nd and template argument conversion constructor copy copy constructor 2nd 3rd and assignment operator argument passing base from derived for derived class initialization Message copy control 2nd handle class inheritance message handling example multiple inheritance of pointer members copy-initialization using constructor copy_backward count book finding program map multimap multiset set count, use 2nd count_if 2nd with function object argument cout 2nd by default tied to cin cstddef header 2nd cstdlib header cstring header ctrl-d (Unix end-of-file) ctrl-z (Windows end-of-file) curly brace 2nd |