Xem mẫu

floating point: float · 130, 155; float.h · 129; internal format · 189; number size hierarchy · 132; numbers · 130, 154; true and false · 159 for: defining variables inside the control expression · 145; loop · 106, 121; loop counter, defined inside control expression · 291; variable lifetime in for loops · 292 formatting pointer definitions · 342 forward: declaration · 151; reference, inline · 391 Fowler, Martin · 45, 58, 779 fragile base-class problem · 276 fragmentation, heap · 225, 567 free store · 549 free( ) · 223, 550, 553, 555, 569 free-standing reference · 451 friend · 263, 554; declaration of a nested friend class · 514; global function · 264; injection into namespace · 417; member function · 264; nested structure · 266; structure · 264 fstream · 100 function · 81; abstract base classes and pure virtual functions · 646; access · 379; adding more to a design · 280; adding new virtual functions in the derived class · 652; address · 198, 391; argument · 138; const · 344; const reference · 351; reference · 451; array of pointers to · 201; assembly-language code generated; function call · 456; virtual function call · 642; binding, for a function call · 631, 641; body · 83; C library · 116; call operator( ) · 514; call overhead · 372, 377; called for side effect · 313; complicated function definitions · 198; constructors, behavior of virtual functions inside · 664; creating · 112; declaration · 116, 245, 313; not essential in C · 228; required · 233; syntax · 82; definition · 83; empty argument list, C vs. C++ · 114; expanding the function interface · 330; global · 234; friend · 264; helper, assembly · 457; inline · 372, 377, 646; header files · 396; local class (class defined inside a function) · 428; member function · 28, 230; calling; a member function · 239; another member function from within a member function · 234; base-class functions · 588; const · 352, 359; friend · 264; inheritance and static member functions · 604; overloaded operator · 487; selection · 234; objects · 515; overloading · 310; operator · 486; using declaration, namespaces · 421; overriding · 35; pass-by reference & temporary objects · 453; pointer; defining · 198; to member function · 475; using a function pointer · 200; polymorphic function call · 637; prototyping · 113; pure virtual function definitions · 651; redefinition during inheritance · 588; return value; by reference · 451; returning a value · 115; type · 597; void · 115; signature · 597; stack frame for a function call · 458; static; class objects inside functions · 408; member · 366, 429, 465; objects inside functions · 437; variables inside functions · 406; templates · 742; type · 390; unique identifier for each · 310; variable argument list · 114; virtual function · 627, 629; constructor · 662; overriding · 632; picturing · 639 G garbage collector · 42, 566 generic algorithm · 742 get and set functions · 381 get( ) · 472 getline( ): and string · 562; from iostreams library · 100 Glass, Robert · 780 global: friend function · 264; functions · 234; new and delete, overloading · 568; object constructor · 410; operator, overloaded · 487; scope resolution · 253; static initialization dependency of global objects · 432; variables · 147 GNU C++ · 71 830 Gorlen, Keith · 694 goto · 125, 288, 293; non-local · 288 greater than: > · 158; or equal to (>=) · 158 guaranteed initialization · 294, 548 guards, include, on header files · 757 guidelines: argument passing · 455; C++ programming guidelines · 760; object development · 56 H hack, enum · 358 handle classes · 275, 277 has-a · 30; composition · 604 header file · 85, 116, 129, 233, 242, 323, 335; code organization · 248; enforced use of in C++ · 243; formatting standard · 246; importance of using a common header file · 242; include guards · 246; inline definitions · 377; internal linkage · 412; multiple inclusion · 244; namespaces · 423; new file include format · 86; order of inclusion · 756; structure definition in a header file · 234; templates · 700, 707; using directives · 248 heap · 42, 223; C heap · 550; compactor · 225; creating objects · 554; fragmentation · 225, 567; guaranteeing that all objects are created on the heap · 712; storage allocation · 549; simple example system · 570 helper function, assembly · 457 hexadecimal · 154 hiding: function names inside a struct · 230; implementation · 28, 260, 270, 275; names; during inheritance · 595; during overloading · 658; variables from the enclosing scope · 292 hierarchy, singly-rooted/object-based · 672, 694 high concept · 48 high-level assembly language · 113 hostile programmers · 276 hybrid: C++, hybrid object-oriented language, and friend · 269; object-oriented programming language · 7 I identifier: unique for each function · 310; unique for each object · 238 IEEE standard for floating-point numbers · 130, 189 if-else · 118; defining variables inside the conditional · 145; statement · 164; ternary ?: · 164 ifstream · 100, 606 implementation · 27, 241; and interface, separating · 29, 261, 271, 380; hiding · 28, 260, 270, 275; compile-time only · 275 implicit type conversion · 154 in situ inline functions · 394 include · 85; include guards, in header files · 246, 757; new include format · 86 incomplete type specification · 265, 277 increment · 128, 164; and decrement operators · 506; incrementing and enumeration · 180; overloading operator ++ · 493 incremental: development · 614; programming · 614 indeterminate argument list · 114 indexing: array, using [ ] · 105, 183; zero · 183 inheritance · 31, 584, 586, 615; choosing composition vs. inheritance · 604; class inheritance diagrams · 617; combining composition & inheritance · 591; copy-constructor · 471; diagram · 40; extending a class during · 34; extensibility · 633; function redefinition · 588; initialization · 663; is-a · 600, 615; multiple · 586, 613, 621, 673, 695; name hiding · 658; operator overloading & inheritance · 612; order of construction · 665; private inheritance · 609; protected inheritance · 611; public inheritance · 587; static member functions · 604; subtyping · 606; virtual function calls in destructors · 670; vs. composition · 620, 740; VTABLE · 652 initialization · 227, 356; aggregate · 201, 301; array; elements · 301; to zero · 301; 831 const data members · 355; const inside class · 353; constructor · 285; constructor initializer list · 353, 589, 664; definition, simultaneous · 290; for loop · 106, 121; guaranteed · 294, 548; during inheritance · 663; initialization and cleanup on the heap · 548; initializer for a static variable of a built-in type · 408; lazy · 704; member object initialization · 589; memberwise · 471, 600; object using = · 521; static; array · 425; const · 356; dependency · 432; member · 425; zero initialization by the linking-loading mechanism · 433; variables at point of definition · 130; vs. bitcopy · 460 injection, friend into namespace · 417 inline · 394, 662; class definition · 378; constructor efficiency · 663; constructors · 392; convenience · 393; definitions and header files · 377; destructors · 392; effectiveness · 390; efficiency · 392; function · 372, 377, 646; header files · 396; in situ · 394; limitations · 390; non-inline template member function definitions · 699; order of evaluation · 391; templates · 707 in-memory compilation · 78 input: reading by words · 106; standard · 97 insert( ) · 104 inserter and extractor, overloading for iostreams · 518 instance of a class · 24 instantiation, template · 699 int · 130 interface · 241; base-class interface · 633; common interface · 647; defining the class · 62; expanding function interface · 330; for an object · 25; implementation, separation of · 29, 261, 271, 380; implied by a template · 701; user · 51 internal linkage · 152, 335, 339, 412 interpreters · 77 interrupt service routine (ISR) · 366, 458 iostreams · 90; get( ) · 472; getline( ) · 100; global overloaded new & delete; interaction with · 572; limitations of · 569; manipulators · 96; overloading << and >> · 518; reading and writing files · 100; reading input · 97; setf( ) · 466; strings with iostreams · 100; width( ) · 466 is-a: inheritance · 604, 615; vs. is-like-a relationships · 35 ISO Standard: C · 14; fundamentals · 112; C++ · 14; header files · 245 istream, overloading operator >> · 520 iteration, in program development · 57 iterator · 509, 719, 730; containers · 690; motivation · 738; nested class · 512; Standard C++ Library · 724 J Jacobsen, Ivar · 779 Java · 3, 15, 65, 71, 74, 588, 645, 694, 816 K K&R C · 112 keywords: #define · 245, 335; #endif · 245, 757; #ifdef · 245; #include · 85; & · 134; ( ), function call operator overloading · 514; * · 136, 164; .* · 474; :: · 232, 253; ‘.’ (member selection operator) · 237; = · 156; overloading · 505, 521; -> · 164; overloading · 509; struct member selection via pointer · 178; ->* · 474; overloading · 514; asm, for in-line assembly language · 173; auto · 149, 414; bool · 125; true and false · 131; break · 122; case · 124; catch · 572; char · 96, 130, 132; class · 25, 31, 271; const · 153, 333, 453; const_cast · 170; continue · 122; default · 124; delete · 42, 223; do · 120; double · 130, 132; dynamic_cast · 678; else · 118; enum · 179, 358; untagged · 320; explicit · 534; extern · 84, 147, 151, 335, 339, 412; for alternate linkage · 442; false · 117, 131; float · 130, 132; for · 106, 121; friend · 263; goto · 125, 288, 293; if · 118; inline · 394, 662; int · 130; long · 832 132; long double · 132; long float (not legal) · 132; mutable · 363; namespace · 91, 414, 757; new · 42, 223; operator · 486; private · 262, 270, 380, 610; protected · 263, 270, 610; public · 261; register · 149, 414; reinterpret_cast · 171; return · 115; short · 132; signed · 132; signed char · 132; sizeof · 132, 172, 587; with struct · 240; static · 149, 350, 406; static_cast · 169, 679; struct · 175, 260; switch · 123, 293; template · 689, 696; this · 234, 286, 363, 380, 429; throw · 572; true · 117, 131; try · 572; typedef · 174; typeid · 680; union · 181, 318; anonymous · 320; unsigned · 132; using · 92, 417; virtual · 39, 595, 627, 632, 637, 646, 665; void · 114; void& (illegal) · 143; void* · 142, 450; volatile · 155; while · 101, 119 Koenig, Andrew · 376, 762, 778 L Lajoie, Josee · 776 Lakos, John · 756, 778 language: C++ is a more strongly typed language · 450; C++, hybrid object-oriented language, and friend · 269; hybrid object-oriented programming language · 7 large programs, creation of · 78 late binding · 38, 631; implementing · 636 layout, object, and access control · 269 lazy initialization · 704 leading underscore, on identifiers (reserved) · 381 leaks, memory · 224, 300 left-shift operator << · 160 less than: < · 158; or equal to <= · 158 library · 76, 80, 88, 218; C · 219; code · 78; creating your own with the librarian · 117; issues with different compilers · 312; Standard C function; abort( ) · 409; atexit( ) · 409; exit( ) · 409 lifetime: for loop variables · 292; object · 42, 547; temporary objects · 468 limits.h · 129 linkage · 152, 406; alternate linkage specification · 442; controlling · 412; external · 338, 339, 412; internal · 335, 339, 412; no linkage · 153, 412; type-safe · 313 linked list · 248, 275, 298 linker · 78, 79, 87; collision · 244; external references · 228; object file order · 88; pre-empting a library function · 89; searching libraries · 88, 117; unresolved references · 88 Lippman, Stanley · 776 list: constructor initializer · 353, 589; linked · 248, 275, 298 Lister, Timothy · 781 local: array · 186; classes · 428; static object · 410; variable · 138, 149 logarithm · 466 logical: and && · 166; const · 362; explicit bitwise and logical operators · 173; not ! · 163; operators · 158, 505; or || · 166 long · 132, 135 long double · 132, 155 longjmp( ) · 288 loop: for · 106; loop counter, defined inside control expression · 291; variable lifetime in for loops · 292; while · 101 Love, Tom · 781 lvalue · 156, 346, 698 M machine instructions · 76 macro: argument · 374; makefile · 205; preprocessor · 158, 192, 372; macros for parameterized types, instead of templates · 696; unsafe · 399; to generate classes · 594 magic numbers, avoiding · 334 main( ): basic form · 93; executing code after exiting · 411; executing code before entering · 411 maintenance, program · 58 make · 202; dependencies · 204; macros · 205; suffix rules · 205; SUFFIXES · 206 makefile · 203, 750 833 malloc( ) · 223, 550, 552, 554, 569; behavior, not deterministic in time · 555 management obstacles · 71 mangling, name · 230, 231, 237; and overloading · 311 mathematical operators · 156 Matson, Kris C. · 126 member: defining storage for static data member · 424; initializing const data members · 355; member function · 28, 230; calling · 239; calling another member function from within a member function · 234; const · 352, 359; four member functions the compiler synthesizes · 619; friend · 264; non-inline template member function definitions · 699; return type · 597; selection · 234; signature · 597; static · 366, 429, 465; and inheritance · 604; object · 30; object initialization · 589; overloaded member operator · 487; pointers to members · 473; selection operator · 237; static data member inside a class · 423; vs. non-member operators · 518 memberwise: assignment · 532, 600; const · 362; initialization · 471, 600 memcpy( ) · 560; standard C library function · 326 memory · 133; allocation and efficiency · 566; dynamic memory allocation · 223, 548; leak · 224, 300; finding with overloaded new and delete · 573; from delete void* · 557; management; example of · 324; reference counting · 526; memory manager overhead · 554; read-only (ROM) · 364; simple storage allocation system · 570 memset( ) · 269, 326, 356, 560 mentoring: and training · 71, 73; consulting, mentoring, and design and code walkthroughs from MindView · 16 message, sending · 25, 239, 636 methodology, analysis and design · 44 Meyers, Scott · 28, 760, 778 MindView: public hands-on training seminars · 16; seminars-on-CD-ROM · 16 minimum size of a struct · 241 mission statement · 47 mistakes, and design · 279 modulus (%) · 156 Moo, Barbara · 778 Mortensen, Owen · 477 multiparadigm programming · 24 multiple: dispatching · 675; inclusion of header files · 244; inheritance · 586, 613, 621, 673, 695; multiple-declaration problem · 244 multiplication (*) · 156 multitasking and volatile · 365 multi-way selection · 124 Murray, Rob · 520, 760 mutable · 363; bitwise vs. logical const · 362 mutators · 380 N name: clashes · 229; collisions, in C · 68; decoration · 230, 231, 237, 442; no standard for · 312; overloading and · 311; file · 749; hiding, during inheritance · 595; mangling · 230, 231, 237; and overloading · 311 named constant · 153 namespace · 91, 414, 757; aliasing · 415; ambiguity · 420; continuation · 415; header files · 399; injection of friends · 417; referring to names in · 417; single name space for functions in C · 229; std · 92; unnamed · 416; using · 417; declaration · 421; and overloading · 422; directive · 418; and header files · 247 naming the constructor · 285 narrowing conversions · 170 NDEBUG · 198 needless recompilation · 276 nested: class · 428; friend structure · 266; iterator class · 512, 721; scopes · 144; structures · 248 834 ... - tailieumienphi.vn