home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / C++-faq / part1 next >
Internet Message Format  |  2000-03-01  |  51KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsfeed.sgi.net!feeder.qis.net!novia!nntp3.cerf.net!nntp2.cerf.net!news.cerf.net!not-for-mail
  2. From: mpcline@nic.cerf.net (Marshall Cline)
  3. Newsgroups: comp.lang.c++,comp.answers,news.answers,alt.comp.lang.learn.c-c++
  4. Subject: C++ FAQ (part 1 of 10)
  5. Followup-To: comp.lang.c++
  6. Date: 29 Feb 2000 20:06:19 GMT
  7. Organization: ATT Cerfnet
  8. Lines: 1272
  9. Approved: news-answers-request@mit.edu
  10. Distribution: world
  11. Expires: +1 month
  12. Message-ID: <89h8rr$bto$1@news.cerf.net>
  13. Reply-To: cline@parashift.com (Marshall Cline)
  14. NNTP-Posting-Host: nic1.san.cerf.net
  15. X-Trace: news.cerf.net 951854779 12216 192.215.81.88 (29 Feb 2000 20:06:19 GMT)
  16. X-Complaints-To: abuse@cerf.net
  17. NNTP-Posting-Date: 29 Feb 2000 20:06:19 GMT
  18. Summary: Please read this before posting to comp.lang.c++
  19. Xref: senator-bedfellow.mit.edu comp.lang.c++:453819 comp.answers:39859 news.answers:178218 alt.comp.lang.learn.c-c++:40797
  20.  
  21. Archive-name: C++-faq/part1
  22. Posting-Frequency: monthly
  23. Last-modified: Feb 29, 2000
  24. URL: http://marshall-cline.home.att.net/cpp-faq-lite/
  25.  
  26. AUTHOR: Marshall Cline / cline@parashift.com / 972-931-9470
  27.  
  28. COPYRIGHT: This posting is part of "C++ FAQ Lite."  The entire "C++ FAQ Lite"
  29. document is Copyright(C)1991-2000 Marshall Cline, Ph.D., cline@parashift.com.
  30. All rights reserved.  Copying is permitted only under designated situations.
  31. For details, see section [1].
  32.  
  33. NO WARRANTY: THIS WORK IS PROVIDED ON AN "AS IS" BASIS.  THE AUTHOR PROVIDES NO
  34. WARRANTY WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK, INCLUDING
  35. WARRANTIES WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
  36. PURPOSE.
  37.  
  38. C++-FAQ-Lite != C++-FAQ-Book: This document, C++ FAQ Lite, is not the same as
  39. the C++ FAQ Book.  The book (C++ FAQs, Cline and Lomow, Addison-Wesley) is 500%
  40. larger than this document, and is available in bookstores.  For details, see
  41. section [3].
  42.  
  43. ==============================================================================
  44.  
  45. This "raw text" document was mechanically produced from the HTML version at:
  46.     USA:    http://marshall-cline.home.att.net/cpp-faq-lite/
  47.     USA #2:    http://www.awtechnologies.com/bytes/c++/faq-lite/
  48.     Canada:    http://new-brunswick.net/workshop/c++/faq
  49.     Finland:    http://www.utu.fi/~sisasa/oasis/cppfaq/
  50.     France:    http://caor.ensmp.fr/FAQ/c++-faq-lite/
  51.     Germany:    http://www.informatik.uni-konstanz.de/~kuehl/cpp/cppfaq.htm
  52.     Ireland:    http://snet.wit.ie/GreenSpirit/c++-faq-lite/
  53.     Spain:    http://geneura.ugr.es/~jmerelo/c++-faq/
  54.     Taiwan:    http://www.cis.nctu.edu.tw/c++/C++FAQ-English/
  55.  
  56. If you have a Web browser, you probably want to read one of the above HTML
  57. sites instead of this document because:
  58.  * The HTML version has many hyperlinked cross references.
  59.  * The HTML version is MUCH easier to read than this "raw text" version.
  60.  * The HTML version is updated more regularly than this "monthly posting".
  61.  
  62. ==============================================================================
  63.  
  64. Improve network response:
  65.  
  66.  * Use the closest mirror site (see URLs above).
  67.  * Browse the FAQ off-line: Use the one-click download feature to get your own
  68.    local copy.[NEW!]
  69.  
  70. Available in several languages:
  71.  
  72.  * English <http://marshall-cline.home.att.net/cpp-faq-lite/>.
  73.  * Chinese (uses Big5 character set).
  74.  * Portuguese.
  75.  
  76. Look up stuff:
  77.  
  78.  * Look up a generic topic with the table of contents (35 coarse-grained
  79.    topics).
  80.  * Look up a specific topic with the extensive subject index (774 fine-grained
  81.    topics).
  82.  * Look up the changed topics with the chain of recent changes (38 changes for
  83.    1/00 and 3/00).
  84.  
  85. Table of Contents:
  86.  
  87.  * [1] Copying permissions
  88.  * [2] On-line sites that distribute this document
  89.  * [3] C++-FAQ-Book versus C++-FAQ-Lite
  90.  * [4] Recent changes to this document
  91.  * [5] Netiquette when posting to comp.lang.c++
  92.  * [6] Big Picture issues
  93.  * [7] Classes and objects
  94.  * [8] References
  95.  * [9] Inline functions
  96.  * [10] Constructors
  97.  * [11] Destructors
  98.  * [12] Assignment operators
  99.  * [13] Operator overloading
  100.  * [14] Friends
  101.  * [15] Input/output via <iostream.h> and <stdio.h>
  102.  * [16] Freestore management
  103.  * [17] Exceptions and error handling
  104.  * [18] Const correctness
  105.  * [19] Inheritance -- basics
  106.  * [20] Inheritance -- virtual functions
  107.  * [21] Inheritance -- proper inheritance and substitutability
  108.  * [22] Inheritance -- abstract base classes (ABCs)
  109.  * [23] Inheritance -- what your mother never told you
  110.  * [24] Inheritance -- private and protected inheritance
  111.  * [25] Coding standards
  112.  * [26] Learning OO/C++
  113.  * [27] Learning C++ if you already know Smalltalk
  114.  * [28] Reference and value semantics
  115.  * [29] How to mix C and C++
  116.  * [30] Pointers to member functions
  117.  * [31] Container classes and templates
  118.  * [32] Class libraries
  119.  * [33] Compiler dependencies
  120.  * [34] Miscellaneous technical issues
  121.  * [35] Miscellaneous environmental issues
  122.  
  123. ==============================================================================
  124.  
  125. Subject Index
  126.  
  127. "A"
  128.  * ABC (see also Inheritance) ... [22.2], [22.3]
  129.  * Access rules
  130.    - protected: and private: inheritance ... [24.6]
  131.    - protected: and private: members ... [19.5], [19.6]
  132.  * Acronyms ... [5.1]
  133.  * Ada vs. C++ ... [6.4]
  134.  * AFAICS (Acronym) ... [5.1]
  135.  * Aliasing
  136.    - Aliasing of const and non-const pointers ... [18.9], [18.11], [18.12],
  137.      [18.13]
  138.    - References are aliases for objects ... [8.1], [8.5]
  139.  * All Terrain Vehicle (ATV) ... [27.5]
  140.  * ANSI ... [6.11]
  141.    - ANSI-C ... [6.10]
  142.    - ANSI-C++ ... [6.12]
  143.    - ANSI-C++ committee "X3J16" ... [6.11], [27.1]
  144.  * Arity ... [13.7]
  145.  * Arrays
  146.    - Arrays are evil ... [10.5], [13.6], [16.16], [17.3], [21.5]
  147.    - Specifying length at runtime ... [16.18]
  148.  * Artistic Style (see Pretty Printing) ... [35.2]
  149.  * Assignment operator ... [12]
  150.    - Check for self-assignment ... [22.5], [25.9]
  151.    - Return *this ... [25.9]
  152.    - Self-assignment ... [12.1], [12.2], [12.3]
  153.    - Use const in parameter ... [25.9]
  154.  * Associative array (see also STL) ... [31.1]
  155.  * Associativity ... [13.7]
  156.  * Author (see also C++ FAQ Lite) ... [1.1]
  157.  * auto_ptr ... [17.2]
  158.  
  159. "B"
  160.  * Backtracking ... [5.3]
  161.  * bad_alloc (see also Freestore) ... [16.5], [16.6]
  162.  * Bag of Apple vs. of Fruit ... [21.3]
  163.  * Base class ... [19.3]
  164.  * Beautifier, Code (see Pretty printing) ... [35.2]
  165.  * Beginners books ... [26.8]
  166.  * Big Picture issues (see Managerial issues) ... [6]
  167.  * Big Three, Law of ... [16.16], [22.5], [25.9]
  168.  * Binary compatibility between vendors ... [33.8]
  169.  * Binding: Static vs. dynamic ... [20.2], [20.3]
  170.  * Book (see C++ FAQ Book) ... [3]
  171.  * Books on C++ ... [26]
  172.  * Books
  173.    - Beginners ... [26.8]
  174.    - Design ... [26.7]
  175.    - Legality issues of C++ ... [26.4], [26.6]
  176.    - Morality issues of C++ ... [26.4], [26.5]
  177.  * BTW (Acronym) ... [5.1]
  178.  * Business criteria dominate technical criteria ... [6.4]
  179.  
  180. "C"
  181.  * C++2LaTeX (see Pretty printing) ... [35.2]
  182.  * C++ books ... [26]
  183.  * C++ compiler
  184.    - Free ... [33.1]
  185.  * C++ FAQ Book ... [3]
  186.    - Available only in bookstores ... [3.3]
  187.    - Is much bigger than this Lite document ... [3.2]
  188.    - ISBN ... [3.1]
  189.    - Not same as the on-line ("Lite") document ... [3.2]
  190.    - URL for Amazon.com ... [3.1]
  191.  * C++ FAQ Lite ... [3]
  192.    - Author ... [1.1]
  193.    - Availability on-line ... [2]
  194.    - Book is much bigger ... [3.2]
  195.    - Chinese translation ... [2.5]
  196.    - Copy permissions ... [1]
  197.    - Copying permissions ... [1.3]
  198.    - Copyright notice ... [1.2]
  199.    - Downloading ... [2.2], [2.3], [2.4]
  200.    - French translation ... [2.7]
  201.    - HTML version ... [2.2]
  202.    - Mirror WWW sites ... [2.1]
  203.    - No Warranty ... [1.4]
  204.    - Not same as C++ FAQ Book ... [1.6], [3.2]
  205.    - Plaintext version ... [2.3], [2.4]
  206.    - Portuguese translation ... [2.6]
  207.    - Recent changes ... [4]
  208.  * C language
  209.    - Accessing C++ data members from C ... [29.9]
  210.    - C++ backward compatibility ... [6.10]
  211.    - C++ is higher level than C ... [29.10]
  212.    - C vs. C++ ... [6.4]
  213.    - Calling C from C++ ... [29.5]
  214.    - Calling C++ from C ... [29.6]
  215.    - Coding standards different from C++ ... [25.3]
  216.    - Common linker errors ... [23.4], [29.7]
  217.    - __cplusplus ... [29.4]
  218.    - extern C ... [29.3]
  219.    - Including C headers ... [29.2], [29.3], [29.4]
  220.    - Linking must be directed by C++ ... [29.1]
  221.    - main() must be compiled using C++ ... [29.1]
  222.    - Mixing C and C++ code ... [29]
  223.    - Newsgroup comp.lang.c ... [5.8]
  224.    - Not an efficient way to learn OO/C++ ... [26.2]
  225.    - Passing C++ objects to C code ... [29.8], [29.9]
  226.    - static at file-scope ... [7.5]
  227.  * C++ Libraries FAQ ... [32.9]
  228.  * Cache Misses
  229.    - Avoiding with a Matrix class ... [13.9]
  230.    - Striding the cache ... [13.9]
  231.  * Changes to this document (see also C++ FAQ Lite) ... [4]
  232.  * char*: Use a string-like class instead ... [13.6], [17.3]
  233.  * Chinese translation of this document ... [2.5]
  234.  * Circles vs. Ellipses ... [21.6], [21.7], [21.8], [21.9]
  235.  * Circular dependencies ... [34.9]
  236.  * class ... [7.1], [7.8]
  237.  * clone() methods ... [16.22], [20.5], [22.5]
  238.  * Coding standards ... [25]
  239.    - Assignment operators check assignment-to-self ... [12.1], [25.9]
  240.    - Assignment operators return *this ... [25.9]
  241.    - Assignment operators use const ... [25.9]
  242.    - Avoid arrays whenever possible ... [21.5]
  243.    - Avoid dynamically typed libraries ... [32.5]
  244.    - Avoid global variables ... [34.5]
  245.    - Avoid hiding nested identifiers ... [34.5]
  246.    - Bloodshed, Jihads, and Heat vs. Light ... [25.1]
  247.    - Coding standards are never sufficient ... [25.2]
  248.    - Coding standards are sometimes necessary ... [25.2]
  249.    - const_cast ... [18.10]
  250.    - Copy constructors use const ... [25.9]
  251.    - Declare near first use ... [25.6]
  252.    - Design classes from the outside-in ... [13.10]
  253.    - Don't base C++ standards on C standards ... [25.3]
  254.    - Don't test for NULL after new ... [16.5]
  255.    - Don't test for NULL before delete ... [16.7]
  256.    - Explicitly calling destructors (Don't!) ... [11.5], [11.6], [11.9]
  257.    - Explicitly calling destructors (OK sometimes) ... [11.10]
  258.    - Header filename extensions ... [25.8]
  259.    - Identifier naming conventions ... [25.10]
  260.    - Initialization lists ... [10.6], [25.9]
  261.    - Law of the Big Three ... [16.16], [25.9]
  262.    - Macros that contain if ... [34.1]
  263.    - Macros that contain multiple lines ... [34.2]
  264.    - Macros that contain token pasting ... [34.3]
  265.    - Operator overloading ... [25.9]
  266.    - Source filename extensions ... [25.7]
  267.    - static at file-scope (Don't!) ... [7.5]
  268.    - The Ellemtel coding guidelines ... [25.11]
  269.    - Todd Hoff's coding guidelines ... [25.11]
  270.    - Use a string object rather than a char* ... [13.6], [17.3]
  271.    - Use delete[] for arrays ... [16.11]
  272.    - Use of the ternary ?: operator ... [25.5]
  273.    - virtual destructors ... [20.4], [25.9]
  274.  * Column-major order ... [13.9]
  275.  * Combinations ... [5.3]
  276.  * Committee Draft (CD) for ANSI/ISO-C++ ... [6.12]
  277.  * Compatibility, Binary ... [33.8]
  278.  * Compiler dependencies ... [33], [33.5]
  279.  * Composition
  280.    - Benefits compared to freestore ... [28.4], [28.5]
  281.    - Compared with private inheritance ... [24.2]
  282.    - Criteria for composition vs. private inheritance ... [24.3]
  283.    - Inlining virtual functions ... [28.5], [28.6]
  284.  * const_cast ... [18.10]
  285.  * Const correctness ... [18], [18.1]
  286.    - A form of type safety ... [18.2]
  287.    - Aliasing of const and non-const pointers ... [18.12]
  288.    - Coding standards concerning ... [25.9], [25.9]
  289.    - const_cast ... [18.10], [18.11]
  290.    - const member functions ... [18.9]
  291.    - Fred& const x is nonsense ... [18.7]
  292.    - Fred const& x -- use const Fred& x instead ... [18.8]
  293.    - Immutable (const) pointers ... [18.5]
  294.    - mutable ... [18.10]
  295.    - Pointer-to-const ... [18.4], [18.5]
  296.    - Pointer-to-const aliasing ... [18.13]
  297.    - Reference-to-const ... [18.6]
  298.    - Retrofitting const correctness is hard ... [18.3]
  299.  * Construct On First Use Idiom ... [10.12], [10.13]
  300.  * Constructors ... [10], [16.9]
  301.    - Build objects from dust ... [10.1]
  302.    - Calling a virtual from ... [23.1]
  303.    - Calling another constructor ... [10.3]
  304.    - Coding standards re. copy constructor ... [25.9]
  305.    - Default constructors ... [10.4], [10.5]
  306.    - Init methods ... [10.3]
  307.    - Initialization coding standard ... [10.6], [25.9]
  308.    - Initialization of static data ... [10.11], [10.12], [10.13]
  309.    - Member objects should be self-managing ... [17.2]
  310.    - Named Constructor Idiom ... [10.8], [16.19], [16.22]
  311.    - Throwing exceptions ... [17.1]
  312.    - Using this within ... [10.7]
  313.    - Virtual Constructor Idiom ... [16.22], [20.5], [22.5]
  314.  * Containers ... [31]
  315.    - Container of Thing vs. of Anything ... [21.4]
  316.    - Heterogeneous ... [31.2]
  317.    - Iterators ... [31.3]
  318.  * Copy constructors
  319.    - Should use const ... [25.9]
  320.  * Copy on write (see Reference counting) ... [16.21], [16.22]
  321.  * Copy semantics (see also Value semantics) ... [28.1]
  322.  * Copying permissions (see also C++ FAQ Lite) ... [1], [1.3]
  323.  * Copyright notice (see also C++ FAQ Lite) ... [1.2]
  324.  * CORBA FAQ
  325.    - HTML version ... [2.4]
  326.  * Covariant Return Types ... [20.5]
  327.  * Crash at runtime without any warning ... [11.5], [11.6], [16.2], [16.4],
  328.    [16.11], [16.12], [17.3], [20.4], [21.1], [21.4], [21.5], [34.5]
  329.  * create() methods (see Named Constructor Idiom) ... [10.8], [16.19], [16.22]
  330.  * Ctor (see also Constructors) ... [10]
  331.  
  332. "D"
  333.  * Dangerous programming practices ... [11.5], [11.6], [11.10], [13.6], [16.2],
  334.    [16.4], [16.11], [16.12], [16.16], [17.3], [20.4], [21.1], [21.4], [21.5],
  335.    [23.3], [34.5]
  336.  * Dangling else problems ... [34.1]
  337.  * Declarations
  338.    - Declare near first use ... [25.6]
  339.    - List x(); declares a function, not an object ... [10.2]
  340.  * Decompiling executables back into C++ source code ... [33.4]
  341.  * Default parameters ... [10.3]
  342.  * #define macros
  343.    - Evil! ... [9.3], [27.3], [34.1], [34.2], [34.3]
  344.    - Evil but sometimes useful ... [29.4], [30.5], [30.6]
  345.    - See also Inline functions ... [9.1], [9.3], [26.2], [27.3], [29.4],
  346.      [30.5], [30.6]
  347.    - with if ... [34.1]
  348.    - with multiple lines ... [34.2]
  349.    - with token pasting ... [34.3]
  350.  * delete ... [16.1]
  351.    - delete p actually deletes *p, not p ... [16.1]
  352.    - delete this ... [16.14]
  353.    - delete[] uses magic ... [16.13], [33.6], [33.7]
  354.    - delete[] vs. delete ... [16.11]
  355.    - delete[] vs. delete for builtin types ... [16.12]
  356.    - Deleting an array with delete[] ... [16.10]
  357.    - Mixing with malloc() ... [16.2]
  358.  * Derived classes ... [19.3]
  359.    - Can access protected parts of Base ... [19.7]
  360.    - Can't access private parts of Base ... [19.6]
  361.    - Derived* to Base* conversion ... [19.4], [21.2]
  362.    - Derived** to Base** conversion (invalid) ... [21.2]
  363.    - Derived* to private Base* conversion (invalid) ... [24.4]
  364.  * Design books ... [26.7]
  365.  * Destructors ... [11], [16.8], [16.13], [33.6], [33.7]
  366.    - Base class subobjects are automagically destructed ... [11.12]
  367.    - Calling a virtual from ... [23.1]
  368.    - Can't be overloaded ... [11.4]
  369.    - Coding standards concerning ... [25.9]
  370.    - Controlling lifetimes of locals ... [11.6], [11.7], [11.8]
  371.    - Explicitly calling them (Don't!) ... [11.5], [11.6], [11.9]
  372.    - Explicitly calling them (OK sometimes) ... [11.10]
  373.    - Last rites ... [11.1]
  374.    - Member objects are automagically destructed ... [11.11]
  375.    - Order of destruction for array elements ... [11.3]
  376.    - Order of destruction for locals ... [11.2]
  377.    - virtual destructor coding standard ... [20.4]
  378.  * Dijkstra ... [5.3]
  379.  * Directory separator: use "/", not "\" ... [15.10], [34.4]
  380.  * Downloading
  381.    - HTML version of C++ FAQ Lite ... [2.2]
  382.    - HTML version of this document ... [2.1]
  383.    - Plaintext version of C++ FAQ Lite ... [2.3]
  384.    - Why it's done via email ... [2.4]
  385.  * Dtor (see also Destructors) ... [11]
  386.  * Dynamic
  387.    - Dynamic binding ... [6.7], [20.2], [20.3]
  388.    - dynamic_cast ... [31.2]
  389.    - Dynamic length arrays ... [16.18]
  390.    - Dynamic typing ... [20.2], [27.2], [27.3], [32.5], [32.6]
  391.  
  392. "E"
  393.  * Ellemtel coding guidelines (see also Coding standards) ... [25.11]
  394.  * Ellipses vs. Circles ... [21.6], [21.7], [21.8], [21.9]
  395.  * Encapsulation ... [6.7], [7]
  396.    - Definition ... [7.4]
  397.    - Hides stuff from code, not from people ... [7.6]
  398.    - Not necessarily violated by friends ... [14.2]
  399.    - Security vs. Encapsulation ... [7.7]
  400.  * End-of-file (see Input/output) ... [15.2], [15.4]
  401.  * Equation parsing in C++ ... [5.3]
  402.  * Etiquette (see also Netiquette) ... [5]
  403.  * Evil things
  404.    - Macros ... [9.3], [27.3], [34.1], [34.2], [34.3]
  405.  * Exceptions ... [17]
  406.    - Constructors can throw exceptions ... [17.1]
  407.    - Example of throw; to re-throw current exception ... [16.9], [17.3],
  408.      [33.6], [33.7]
  409.    - Example of try ... catch ... [16.9], [17.3], [33.6], [33.7]
  410.    - Member objects should be self-managing ... [17.2]
  411.  * Executables -- decompiling back to C++ source code ... [33.4]
  412.  * extern C (see also C language) ... [29], [29.3]
  413.  
  414. "F"
  415.  * Features of C++ from a business perspective ... [6.7]
  416.  * Filenames
  417.    - Extensions for header files ... [25.8]
  418.    - Extensions for source code files ... [25.7]
  419.    - Using "/" rather than "\" for directories ... [15.10], [34.4]
  420.  * find_if ... [32.3]
  421.  * Floating point ... [34.8], [35.5]
  422.  * for loop ... [34.5]
  423.  * FORTRAN vs. C++ ... [6.4]
  424.  * Forward declarations ... [34.9]
  425.    - Inline functions ... [34.11]
  426.    - Member object containment ... [34.10]
  427.    - Templates ... [34.12]
  428.  * Free C++ compiler ... [33.1]
  429.  * free() (see also Freestore) ... [16.2]
  430.  * Freestore ... [16]
  431.    - Allocating an array with new T[n] ... [16.10]
  432.    - Automating a NULL test ... [16.6]
  433.    - bad_alloc ... [16.5], [16.6]
  434.    - delete handles NULL automatically ... [16.7]
  435.    - delete has two steps ... [16.8]
  436.    - delete this ... [16.14]
  437.    - delete[] uses magic ... [16.13], [33.6], [33.7]
  438.    - delete[] vs. delete ... [16.11]
  439.    - delete[] vs. delete for builtin types ... [16.12]
  440.    - Deleting an array with delete[] ... [16.10]
  441.    - Mixing malloc() and delete ... [16.2]
  442.    - Mixing new and free() ... [16.2]
  443.    - Multi-dimensional arrays ... [16.15], [16.16]
  444.    - new has two steps ... [16.9]
  445.    - new never returns NULL ... [16.5]
  446.    - Placement new ... [11.10], [16.9]
  447.    - Prohibiting local objects ... [16.19]
  448.    - realloc() ... [16.4]
  449.    - Reference counting ... [16.20], [16.21], [16.22]
  450.    - Runtime costs of heap ... [28.4], [28.5]
  451.    - set_new_handler ... [16.6]
  452.    - Why use new rather than malloc() ... [16.3]
  453.  * French translation of this document ... [2.7]
  454.  * Friends ... [14]
  455.    - Choosing between members and friends ... [14.5]
  456.    - Definition of friend ... [14.1]
  457.    - friend doesn't necessarily violate encapsulation ... [14.2]
  458.    - Friendship privileges aren't inherited ... [14.4]
  459.    - Friendship privileges aren't transitive ... [14.4]
  460.    - istream operator>> ... [15.7]
  461.    - ostream operator<< ... [15.6]
  462.    - ostream operator<< (virtual) ... [15.8]
  463.    - Pros and cons of friends ... [14.3]
  464.    - Virtual Friend Function Idiom ... [14.3], [15.8]
  465.  * From: line of a posting (see also Netiquette) ... [5.4]
  466.  * FTP sites
  467.    - 128.231.128.7 ... [32.6]
  468.    - butler.hpl.hp.com ... [32.2]
  469.    - ftp.cs.rpi.edu ... [32.2]
  470.    - ftp.cygnus.com ... [6.12]
  471.    - ftp.germany.eu.net ... [35.2]
  472.    - ftp.maths.warwick.ac.uk ... [6.12]
  473.    - ftp.netlab.cs.rpi.edu ... [35.4]
  474.    - ftp.research.att.com ... [6.12]
  475.    - ftp.tex.ac.uk ... [35.2]
  476.    - garbo.uwasa.fi ... [5.8]
  477.    - oak.oakland.edu ... [5.8]
  478.    - rtfm.mit.edu ... [5.9]
  479.    - venus.ycc.yale.edu ... [35.2]
  480.    - www.cs.rpi.edu ... [32.2]
  481.    - www.cygnus.com ... [35.2]
  482.    - www.maths.warwick.ac.uk ... [32.2]
  483.  * FWIW (Acronym) ... [5.1]
  484.  * FYI (Acronym) ... [5.1]
  485.  
  486. "G"
  487.  * Generalization (see also Inheritance) ... [19.3]
  488.  * Genericity (see also Templates) ... [31.8]
  489.  * Global variables: Just Say No! ... [34.5]
  490.  * GNU
  491.    - emacs ... [35.3]
  492.    - g++ ... [5.8]
  493.  * Graphics ... [5.8]
  494.  * grind (see Pretty printing) ... [35.2]
  495.  * Growth of C++ ... [6.5], [6.7]
  496.  
  497. "H"
  498.  * Has-a (see also Composition) ... [19.2], [24.2]
  499.  * Header files
  500.    - Filename extensions ... [25.8]
  501.    - Standard headers ... [25.4]
  502.  * Heap-sort ... [5.3]
  503.  * Heat vs. light ... [25.1]
  504.  * Heterogeneous containers ... [31.2]
  505.  * Hiding inherited public features ... [21.1], [21.6], [21.7], [21.8]
  506.  * Hiding rule ... [23.3]
  507.  * Homework problems ... [5.2], [5.3]
  508.  * Homogeneous containers ... [31.2]
  509.  * Hostility ... [29.10]
  510.  * How to learn OO/C++ ... [26]
  511.  * HTML version of C++ FAQ Lite ... [2.2]
  512.  * HTML version of the CORBA FAQ ... [2.4]
  513.  * Hybrid OO programming languages ... [26.3]
  514.  * Hype ... [6.3]
  515.  
  516. "I"
  517.  * Idioms
  518.    - Construct On First Use Idiom ... [10.12], [10.13]
  519.    - Named Constructor Idiom ... [10.8], [16.19], [16.22]
  520.    - Virtual Constructor Idiom ... [16.22], [20.5], [22.5]
  521.    - Virtual Friend Function Idiom ... [15.8]
  522.  * if
  523.    - within macros ... [34.1]
  524.  * IMAO (Acronym) ... [5.1]
  525.  * IMHO (Acronym) ... [5.1]
  526.  * Immutable (const) pointers ... [18.5]
  527.  * IMNSHO (Acronym) ... [5.1]
  528.  * IMO (Acronym) ... [5.1]
  529.  * Imperfect programming languages ... [6.2]
  530.  * #include
  531.    - Including C headers ... [29.2], [29.3], [29.4]
  532.    - Use forward slash "/", not backslash "\" ... [34.4]
  533.  * indent (see Pretty printing) ... [35.2]
  534.  * Indirection, Extra layers of ... [28.5]
  535.  * Infix operators ... [5.3]
  536.  * Inheritance ... [6.7], [19], [20], [21], [22], [23]
  537.    - Abstract base classes (ABCs) ... [22], [22.2], [22.3]
  538.    - Access of private: by derived ... [19.6]
  539.    - Access of protected: and private: ... [19.5]
  540.    - Access of protected: by derived ... [19.7]
  541.    - Array of Derived vs. of Base ... [21.4]
  542.    - Calling virtuals from constructors ... [23.1]
  543.    - Circle vs. Ellipse ... [21.6], [21.7], [21.8], [21.9]
  544.    - Derived* to Base* conversion ... [19.4], [21.2]
  545.    - Derived** to Base** conversion (invalid) ... [21.2]
  546.    - Derived* to private Base* conversion (invalid) ... [24.4]
  547.    - Differences between C++ and Smalltalk inheritance ... [27.4]
  548.    - Hiding inherited public features ... [21.1]
  549.    - Hiding rule ... [23.3]
  550.    - How to code inheritance ... [19.3]
  551.    - Importance of inheritance ... [19.1]
  552.    - Is-a-kind-of ... [19.2]
  553.    - Multiple inheritance ... [6.7], [11.12], [24.2], [29.8], [29.9], [33.8],
  554.      [33.11]
  555.    - Old code calls new code ... [6.9]
  556.    - Parking-lot of Car vs. of Vehicle ... [21.3]
  557.    - private inheritance ... [24], [24.1]
  558.    - private inheritance access rules ... [24.6]
  559.    - private inheritance vs. composition ... [24.2], [24.3]
  560.    - protected inheritance access rules ... [24.6]
  561.    - protected vs. private inheritance ... [24.5]
  562.    - Pure virtual functions ... [22.4]
  563.    - Redefining non-virtuals ... [23.2]
  564.    - Smalltalk differences ... [27.5]
  565.    - Specification device ... [19.2]
  566.    - virtual constructors ... [16.22], [20.5], [22.5]
  567.    - virtual data ... [28.2], [28.3]
  568.    - virtual destructor coding standard ... [20.4]
  569.    - virtual functions ... [20.1]
  570.    - virtual functions are central to OO ... [6.8]
  571.    - virtual inheritance ... [11.12], [29.8], [29.9], [33.8], [33.11]
  572.    - What your Mother didn't tell you ... [23]
  573.    - When to use inheritance ... [19.2]
  574.  * Initialization lists (see also Coding standards) ... [10.6], [25.9]
  575.  * Initialization of a static member datum ... [10.9], [10.10], [10.11],
  576.    [10.12], [10.13]
  577.  * Inline functions ... [9]
  578.    - Better than #define macros ... [9.3]
  579.    - Can degrade performance ... [9.7]
  580.    - Defined outside class body ... [9.5]
  581.    - Defined within class body ... [9.6]
  582.    - Forward declarations ... [34.11]
  583.    - Inlining virtual functions ... [28.5], [28.6]
  584.    - Like a #define macro ... [9.1]
  585.    - Member functions ... [9.5]
  586.    - Non-member functions ... [9.4]
  587.    - Safety without loss of speed ... [6.7], [9.2]
  588.  * Input/output ... [15]
  589.    - Binary mode on MS-DOS ... [15.9]
  590.    - istream and eof ... [15.2], [15.4]
  591.    - istream and invalid input characters ... [15.2]
  592.    - istream and while (cin >> foo) ... [15.3]
  593.    - istream operator>> ... [15.7]
  594.    - istream remembers bad state ... [15.5]
  595.    - ostream operator<< ... [15.6]
  596.    - ostream operator<< (virtual) ... [15.8]
  597.  * Inspector methods ... [18.9]
  598.  * Interfaces
  599.    - A simplified view in the user's vocabulary ... [7.3]
  600.    - Abstract base classes (ABCs) ... [22.2]
  601.    - Design interfaces from the outside-in ... [13.10]
  602.    - Goal of interface design ... [7.4]
  603.    - More valuable than implementation ... [22.1]
  604.    - protected interface ... [19.7]
  605.    - Separate from implementation ... [22.2]
  606.  * Intuition isn't always correct ... [21.3], [21.4], [21.6], [21.7], [21.8]
  607.  * Invalid input characters (see Input/output) ... [15.2]
  608.  * iostream.h ... [15.1]
  609.  * Is-a-kind-of (see also Inheritance) ... [19.2]
  610.  * ISO ... [6.11]
  611.    - ISO-C ... [6.10]
  612.    - ISO-C++ ... [6.12]
  613.    - ISO-C++ committee "WG21" ... [6.11]
  614.  * Iterators ... [31.3]
  615.  
  616. "J"
  617.  * Java vs. C++ ... [6.4]
  618.  
  619. "K"
  620.  * Kind-of (see also Inheritance) ... [19.2]
  621.  * Kruskal ... [5.3]
  622.  * KUTGW (Acronym) ... [5.1]
  623.  
  624. "L"
  625.  * Language wars ... [6.4]
  626.  * Large executables ... [32.8], [33.9]
  627.  * Last rites (see also Destructors) ... [11.1]
  628.  * LaTeX
  629.    - C++2LaTeX pretty printer ... [35.2]
  630.    - Macros for "C++" ... [35.1]
  631.  * Law of the Big Three ... [16.16], [22.5], [25.9]
  632.  * Layer of indirection ... [28.5]
  633.  * Learning OO/C++ ... [26]
  634.  * Learning OO/C++
  635.    - How long does it take ... [6.6]
  636.    - No need to learn C first ... [26.2]
  637.    - No need to learn Smalltalk first ... [26.3]
  638.  * Legal mumbo jumbo
  639.    - Author ... [1.1]
  640.    - Copying permissions ... [1.3]
  641.    - Copyright notice ... [1.2]
  642.    - No Warranty ... [1.4]
  643.    - Trademarks ... [1.5]
  644.  * Legality books on C++ ... [26.4], [26.6]
  645.  * Length of time needed to learn OO/C++ ... [6.6]
  646.  * lgrind (see Pretty printing) ... [35.2]
  647.  * Libraries FAQ ... [32.9]
  648.  * Libraries ... [32]
  649.    - Dynamically typed C++ libraries ... [32.5], [32.6]
  650.    - Large executables ... [32.8], [33.9]
  651.    - Numerical Recepies ... [32.7]
  652.    - STL ... [32.1], [32.2], [32.4]
  653.  * Lifetime of objects
  654.    - Controlling lifetime of locals ... [11.6], [11.7], [11.8]
  655.    - In heterogeneous containers ... [31.2]
  656.    - New rule for for loop variables ... [34.5]
  657.    - Order of destruction for array elements ... [11.3]
  658.    - Order of destruction for locals ... [11.2]
  659.    - Register liveness ... [28.5]
  660.    - Using friend classes to achieve separate lifetimes ... [14.2]
  661.  * Linker errors ... [10.10], [23.4], [29.7], [35.5]
  662.  * Logical Interface different from Physical Layout ... [13.9]
  663.  
  664. "M"
  665.  * Macros (see also #define macros) ... [9.3]
  666.  * malloc()
  667.    - (See also Freestore) ... [16.2]
  668.    - Why new is preferred over malloc() ... [16.3]
  669.  * Managerial issues ... [6]
  670.    - Business-centricity vs. Techno-centricity ... [6.4]
  671.    - C++ is a practical tool ... [6.1]
  672.    - C++ is not a perfect tool ... [6.2]
  673.    - Growth of C++ ... [6.5]
  674.    - Length of time needed to learn OO/C++ ... [6.6]
  675.    - Some advantages of OO ... [6.3]
  676.    - Standardization of C++ ... [6.11], [6.12]
  677.  * map<Key,Value> (see also STL) ... [31.1]
  678.  * Maseratti ... [27.5]
  679.  * Matrix subscript operator ... [13.8], [13.9]
  680.  * Member object containment ... [34.10]
  681.  * Mentoring ... [6.6], [26.1]
  682.  * Merge-sort ... [5.3]
  683.  * MFC
  684.    - FAQ ... [33.2]
  685.    - Status bar ... [33.3]
  686.  * Microsoft Windows ... [5.8], [15.9], [35.4]
  687.  * Minimum Spanning Trees in C++ ... [5.3]
  688.  * Mirror sites (see also This document) ... [2]
  689.  * Mixing
  690.    - Mixing C and C++ code (see also C language) ... [29]
  691.    - Mixing malloc() and delete ... [16.2]
  692.    - Mixing new and free() ... [16.2]
  693.  * Monolithic class hierarchies ... [32.5], [32.6]
  694.  * Morality books on C++ ... [26.4], [26.5]
  695.  * MS-DOS ... [5.8], [15.9], [35.4]
  696.  * Multi-dimensional arrays
  697.    - Using pointers ... [16.15]
  698.    - Using specific classes ... [16.16]
  699.    - Using templates ... [16.17]
  700.  * Multiple
  701.    - Multiple encapsulated instances ... [6.7], [7.5], [31.3]
  702.    - Multiple inheritance ... [6.7], [11.12], [24.2], [29.8], [29.9], [33.8],
  703.      [33.11]
  704.  * mutable ... [18.10]
  705.  * Mutator methods ... [18.9]
  706.  * MYOB (Acronym) ... [5.1]
  707.  
  708. "N"
  709.  * "name2()" macro for token pasting ... [34.3]
  710.  * Named Constructor Idiom ... [10.8], [16.19], [16.22]
  711.  * NCITS ... [6.12]
  712.  * Netiquette ... [5]
  713.    - From: line of a posting ... [5.4]
  714.    - General netiquette ... [5.4]
  715.    - Getting and reading other FAQs ... [5.9]
  716.    - Posting code ... [5.7]
  717.    - Reply-to: line of a posting ... [5.4]
  718.    - Selecting an appropriate newsgroup ... [5.8]
  719.    - Subject: line of a posting ... [5.6]
  720.  * new
  721.    - Advantages over malloc() ... [16.3]
  722.    - Allocating an array with new T[n] ... [16.10]
  723.    - Mixing with free() ... [16.2]
  724.    - (See also Freestore) ... [16.1]
  725.  * New handler (see also Freestore) ... [16.6]
  726.  * Newsgroups
  727.    - comp.graphics ... [5.8]
  728.    - comp.lang.c ... [5.8]
  729.    - comp.lang.c++ ... [5.8]
  730.    - comp.lang.c++.moderated ... [5.8]
  731.    - comp.object ... [5.8]
  732.    - comp.os.ms-windows.programmer.misc ... [5.8]
  733.    - comp.os.ms-windows.programmer.tools.* ... [5.8]
  734.    - comp.os.msdos.programmer ... [5.8], [35.4]
  735.    - comp.os.msdos.programmer.turbovision ... [5.8]
  736.    - comp.programming ... [5.8]
  737.    - comp.sources.wanted ... [5.8]
  738.    - comp.std.c++ ... [5.8]
  739.    - comp.sys.mac.oop.* ... [5.8]
  740.    - comp.sys.mac.programmer.* ... [5.8]
  741.    - comp.unix.programmer ... [5.8], [35.4]
  742.    - comp.unix.solaris ... [5.8]
  743.    - comp.windows.ms.programmer ... [35.4]
  744.    - gnu.g++.bug ... [5.8]
  745.    - gnu.g++.help ... [5.8]
  746.  * NIHCL (National Institute of Heath Class Library) ... [32.6]
  747.  * No Warranty (see also C++ FAQ Lite) ... [1.4]
  748.  * Nuclear submarine ... [21.2]
  749.  * NULL ... [16.5], [16.6]
  750.  * Numerical Recepies code ... [32.7]
  751.  
  752. "O"
  753.  * Object ... [7.2]
  754.  * Object-oriented: So what? ... [6.3]
  755.  * Old code calls new code ... [6.9]
  756.  * OO design books ... [26.7]
  757.  * ?: operator ... [25.5]
  758.  * Operator ?: ... [25.5]
  759.  * Operator overloading ... [6.7], [13]
  760.    - Assignment operator ... [12], [22.5]
  761.    - Can't invent new operators ... [13.7]
  762.    - Can't replace behavior on builtins ... [13.6]
  763.    - Coding standards ... [25.9]
  764.    - Does help the users of a class ... [13.2]
  765.    - Does not help the developer of a class ... [13.4]
  766.    - Examples ... [13.3]
  767.    - operator!= ... [13.10]
  768.    - operator() ... [13.8], [13.9]
  769.    - operator++ ... [13.10]
  770.    - operator[] ... [13.8], [13.9]
  771.    - operator delete(void*) ... [16.8], [16.11]
  772.    - operator delete[](void*) ... [16.11]
  773.    - operator* (dereference operator) ... [13.10]
  774.    - operator>> (istream input) ... [15.7]
  775.    - operator new(size_t) ... [16.9]
  776.    - operator<< (ostream output) ... [15.6]
  777.    - operator<< (ostream output; virtual) ... [15.8]
  778.    - Purpose of operator overloading ... [13.1]
  779.    - Self-assignment ... [12.1], [12.2], [12.3]
  780.    - Which operators can be overloaded ... [13.5]
  781.  * Optimization
  782.    - const_cast ... [18.11]
  783.  * Order of static constructors ... [10.11], [10.12], [10.13]
  784.  * OS/2 ... [15.9]
  785.  * OTOH (Acronym) ... [5.1]
  786.  * Overloading
  787.    - Can't overload by return type ... [34.6]
  788.    - Operators (see Operator overloading) ... [6.7]
  789.  
  790. "P"
  791.  * Paradigm shifts ... [6.6], [29.10]
  792.  * Parameterized types (see also Templates) ... [31.7]
  793.  * Parking lots ... [21.3]
  794.  * Part-of (see also Composition) ... [19.2], [24.2]
  795.  * Pascal vs. C++ ... [6.4]
  796.  * Passing parameters
  797.    - By pointer ... [8.1]
  798.    - By reference ... [8.1], [28.8]
  799.    - By value ... [28.8]
  800.  * Perfect programming languages ... [6.2]
  801.  * Permissions to copy this document ... [1]
  802.  * Permutations ... [5.3]
  803.  * Persistence ... [32.5], [32.6], [34.7]
  804.  * Physical Layout different from Logical Interface ... [13.9]
  805.  * Placement new ... [16.9]
  806.  * Plaintext version of C++ FAQ Lite ... [2.3], [2.4]
  807.  * Pointer semantics (see also Reference semantics) ... [28.1]
  808.  * Pointer-to-const ... [18.4], [18.5], [18.13]
  809.  * Pointer to function (see Pointer to member) ... [30.1]
  810.  * Pointer to member ... [30]
  811.    - Address of a C++ method ... [30.4]
  812.    - Array of pointer-to-member ... [30.6]
  813.    - Contrast to pointer-to-function ... [30.1]
  814.    - Converting to pointer-to-function ... [30.2], [30.3]
  815.    - Passing as pointer-to-function ... [30.2]
  816.  * Polymorphism ... [6.7], [20.2]
  817.  * Portuguese translation of this document ... [2.6]
  818.  * Postfix operators ... [5.3]
  819.  * Posting code (see also Netiquette) ... [5.7]
  820.  * Pragmatics ... [6.1]
  821.  * Precidence ... [13.7]
  822.  * Prepare to die! (see also Destructors) ... [11.1]
  823.  * Pretty printing
  824.    - Artistic Style ... [35.2]
  825.    - C++2LaTeX ... [35.2]
  826.    - C-Clearly ... [35.2]
  827.    - GNU indent ... [35.2]
  828.    - tgrind ... [35.2]
  829.  * Prim ... [5.3]
  830.  * private inheritance ... [24], [24.1]
  831.    - Access rules ... [24.6]
  832.    - Compared with composition ... [24.2]
  833.    - Criteria for private inheritance vs. composition ... [24.3]
  834.    - Derived* to private Base* conversion (invalid) ... [24.4]
  835.    - private vs. protected inheritance ... [24.5]
  836.  * private: members ... [19.5], [19.6]
  837.  * Proficiency in OO/C++: How long does it take ... [6.6]
  838.  * protected inheritance
  839.    - Access rules ... [24.6]
  840.    - protected vs. private inheritance ... [24.5]
  841.  * protected: members ... [19.5]
  842.    - The protected: interface ... [19.7]
  843.  * public: inheritance ... [19], [20], [21], [22], [23]
  844.  * public: members ... [19.5]
  845.    - The public: interface ... [19.7]
  846.  * Pure OO programming languages ... [26.3]
  847.  * Pure virtual functions ... [22.3], [22.4]
  848.  
  849. "Q"
  850.  * Quick-sort ... [5.3]
  851.  
  852. "R"
  853.  * realloc() (see also Freestore) ... [16.4]
  854.  * Recent changes to this document (see also C++ FAQ Lite) ... [4]
  855.  * Redefining non-virtuals ... [23.2]
  856.  * Reference counting
  857.    - Copy on write ... [16.21], [16.22]
  858.    - Pointer semantics ... [16.20]
  859.    - Reference semantics ... [16.21]
  860.    - Reference semantics for a hierarchy ... [16.22]
  861.  * Reference semantics ... [28], [28.7], [28.8]
  862.  * References ... [8]
  863.    - Assigning a reference ... [8.2]
  864.    - References to const ... [18.1], [18.6]
  865.    - References vs. pointers ... [8.5]
  866.    - Reseating a reference ... [8.4], [18.7], [18.8]
  867.    - Returning a reference ... [8.3]
  868.  * Referent ... [8.2], [8.4], [28.2]
  869.  * Reply-to: line of a posting (see also Netiquette) ... [5.4]
  870.  * Return type ... [34.6]
  871.  * Row-major order ... [13.9]
  872.  * RTFM (Acronym) ... [5.1]
  873.  * rtfm.mit.edu ... [5.9]
  874.  * Runtime crashes without any warning ... [11.5], [11.6], [16.2], [16.4],
  875.    [16.11], [16.12], [17.3], [20.4], [21.1], [21.4], [21.5], [34.5]
  876.  
  877. "S"
  878.  * Security vs. Encapsulation (see also Encapsulation) ... [7.7]
  879.  * Self-assignment ... [12.1], [12.2], [12.3], [25.9]
  880.  * Self-cleaning member objects ... [17.2]
  881.  * set_new_handler (see also Freestore) ... [16.6]
  882.  * Short-courses (one 40 hour workweek) ... [6.6]
  883.  * Shortest path in C++ ... [5.3]
  884.  * Smalltalk ... [27]
  885.    - Differences with C++ ... [27.1]
  886.    - Dynamic type checking ... [27.2]
  887.    - Inheritance differences ... [27.4], [27.5]
  888.    - Language wars vs. C++ ... [6.4]
  889.    - Not an efficient way to learn OO/C++ ... [26.3]
  890.  * Smart pointers ... [13.3], [16.20], [17.2]
  891.  * SO (Acronym) ... [5.1]
  892.  * Solaris ... [5.8]
  893.  * Sorting in C++ ... [5.3]
  894.  * Source filename extensions ... [25.7]
  895.  * Spanning Trees in C++ ... [5.3]
  896.  * Specialization (see also Inheritance) ... [19.3]
  897.  * Standard headers ... [25.4]
  898.  * Standardization issues ... [5.8], [6.11], [6.12], [27.1]
  899.  * Static
  900.    - Common linker errors due to static data members ... [10.10]
  901.    - Define static data members explicitly ... [10.9], [10.10]
  902.    - Initialization order fiasco ... [10.11], [10.12], [10.13]
  903.    - Named Constructor Idiom using static ... [10.8], [16.19], [16.22]
  904.    - static at file-scope (Don't!) ... [7.5]
  905.    - Static binding ... [20.2], [20.3]
  906.    - static create() methods ... [10.8], [16.19], [16.22]
  907.    - Static typing ... [20.2], [27.2], [27.3]
  908.  * Status bar with MFC ... [33.3]
  909.  * stdio.h ... [15.1]
  910.  * STL ... [32.3]
  911.    - Access to on-line help ... [32.4]
  912.    - FTP sites ... [32.2]
  913.    - map<Key,Value> ... [31.1]
  914.    - vector<T> ... [10.5], [16.18], [21.4], [21.5], [32.3]
  915.  * Striding the cache (see Cache Misses) ... [13.9]
  916.  * string: Better than char* ... [13.6], [17.3]
  917.  * struct ... [7.1], [7.8]
  918.  * Style guidelines (see Coding standards) ... [25]
  919.  * Subclass
  920.    - See also Inheritance ... [19.3]
  921.    - Subclasses that aren't subtypes ... [27.5]
  922.  * Subject: line of a posting (see also Netiquette) ... [5.6]
  923.  * Submarines, Nuclear ... [21.2]
  924.  * Subscript operator for Matrix ... [13.8], [13.9]
  925.  * Substitutability ... [21.3], [21.4], [21.6], [21.7], [21.8]
  926.  * Subtypes that aren't subclasses ... [27.5]
  927.  * Superclass (see also Inheritance) ... [19.3]
  928.  * Syntactic sugar ... [13.1]
  929.  
  930. "T"
  931.  * .tar.gz (see Downloading) ... [2.2], [2.3], [2.4]
  932.  * .tar.Z (see Downloading) ... [2.2], [2.3], [2.4]
  933.  * Templates ... [31]
  934.    - Basics of templates ... [31.4]
  935.    - Class template is a family of classes ... [31.6]
  936.    - Forward declarations ... [34.12]
  937.    - Function template is a family of functions ... [31.5]
  938.    - Genericity ... [31.8]
  939.    - Multi-dimensional arrays ... [16.17]
  940.    - Parameterized types ... [31.7]
  941.  * Ternary operator: ?: ... [25.5]
  942.  * TeX macros for "C++" ... [35.1]
  943.  * tgrind (see Pretty printing) ... [35.2]
  944.  * This document (see also C++ FAQ Lite) ... [3]
  945.  * this used in constructors ... [10.7]
  946.  * throw ... [16.5], [16.6]
  947.  * To-the-power-of operator** (Can't!) ... [13.7]
  948.  * Todd Hoff's coding guidelines (see also Coding standards) ... [25.11]
  949.  * ## = token pasting ... [34.3]
  950.  * Token pasting via ## ... [34.3]
  951.  * Trademarks ... [1.5]
  952.  * Training ... [6.6]
  953.  * Transitivity ... [14.4]
  954.  * Type safety
  955.    - Comparison with Smalltalk ... [27.2]
  956.    - Const correctness ... [18.2]
  957.    - Static vs. dynamic typing ... [20.2]
  958.  * typeid() ... [31.2]
  959.  
  960. "U"
  961.  * Uncompiling executables back into C++ source code ... [33.4]
  962.  * Unix ... [5.8], [35.4]
  963.  * Unresolved external (see also Linker errors) ... [23.4]
  964.  * Usenet newsgroups (see also Newsgroups) ... [5.8]
  965.  
  966. "V"
  967.  * v-pointer (see also virtual) ... [20.3], [33.8]
  968.  * v-table (see also virtual) ... [20.3], [21.4], [23.4], [33.8]
  969.  * Value semantics ... [28], [28.7], [28.8]
  970.  * vector<T> (see also STL) ... [10.5], [16.18], [21.4], [21.5], [32.3]
  971.  * Version numbers to the "language" ... [33.11]
  972.  * virtual
  973.    - Binary compatibility of virtual functions ... [33.8]
  974.    - Calling virtual functions from constructors ... [23.1]
  975.    - Calling virtual functions from destructors ... [23.1]
  976.    - Inlining virtual functions ... [28.5], [28.6]
  977.    - Pure virtual functions ... [22.3], [22.4]
  978.    - Redefining non-virtual member functions ... [23.2]
  979.    - v-pointer (virtual pointer) ... [20.3], [33.8]
  980.    - v-table (virtual table) ... [20.3], [21.4], [23.4], [33.8]
  981.    - Virtual Constructor Idiom ... [16.22], [20.5], [22.5]
  982.    - virtual data ... [28.2], [28.3]
  983.    - virtual destructor coding standard ... [20.4], [25.9]
  984.    - Virtual Friend Function Idiom ... [14.3], [15.8]
  985.    - virtual functions ... [20]
  986.    - virtual functions are central to OO ... [6.8]
  987.    - virtual functions let old code call new code ... [6.9]
  988.    - virtual functions, purpose of ... [20.1]
  989.    - virtual inheritance ... [11.12], [29.8], [29.9], [33.8], [33.11]
  990.  * Visual Basic vs. C++ ... [6.4]
  991.  * Visual C++
  992.    - FAQ ... [33.2]
  993.  
  994. "W"
  995.  * Wars ... [25.1]
  996.  * WWW sites of this document ... [2.1]
  997.  
  998. "X"
  999.  * X3 Secretariat ... [6.12]
  1000.  
  1001. "Y"
  1002.  * Yaccable grammar ... [33.10]
  1003.  
  1004. "Z"
  1005.  * .zip (see Downloading) ... [2.2], [2.3], [2.4]
  1006.  * Zombie objects ... [17.1]
  1007.  
  1008. ==============================================================================
  1009.  
  1010. SECTION [1]: Copying permissions
  1011.  
  1012.  
  1013. [1.1] Author
  1014.  
  1015. Marshall Cline
  1016. cline@parashift.com
  1017.  
  1018. ==============================================================================
  1019.  
  1020. [1.2] Copyright Notice
  1021.  
  1022. The entire C++ FAQ Lite document is Copyright (C) 1991-2000 Marshall P. Cline,
  1023. Ph.D. <http://marshall-cline.home.att.net/>, cline@parashift.com.  All rights
  1024. reserved.  Copying is permitted only under designated situations[1.3].
  1025.  
  1026. ==============================================================================
  1027.  
  1028. [1.3] Copying Permissions
  1029.  
  1030. If all you want to do is quote a small portion of C++ FAQ Lite (such as one or
  1031. two FAQs) in a larger document, simply attribute the quoted portion with
  1032. something vaguely similar to, "From Marshall Cline's C++ FAQ Lite document,
  1033. http://marshall-cline.home.att.net/cpp-faq-lite/".
  1034.  
  1035. If you want to make a copy of large portions and/or the entire C++ FAQ Lite
  1036. document for your own personal use, you may do so without restriction
  1037. (provided, of course, that you don't redistribute the document to others, or
  1038. allow others to copy the document).
  1039.  
  1040. If you want to redistribute large portions and/or the entire C++ FAQ Lite
  1041. document to others, whether or not for commercial use, you must get permission
  1042. from the author first (and that permission is normally granted; note however
  1043. that it's often easier for you to simply tell your recipients about the
  1044. one-click download option[2.2]).  In any event, all copies you make must retain
  1045. verbatim and display conspicuously all the following: all copyright notices,
  1046. the Author[1.1] section, the Copyright Notice[1.2] section, the No
  1047. Warranty[1.4] section, the C++-FAQ-Lite != C++-FAQ-Book[1.6] section, and the
  1048. Copy Permissions[1.3] section.
  1049.  
  1050. If you want more and/or different privileges than are outlined here, please
  1051. contact me, cline@parashift.com.  I'm a very reasonable man...
  1052.  
  1053. ==============================================================================
  1054.  
  1055. [1.4] No Warranty
  1056.  
  1057. THIS WORK IS PROVIDED ON AN "AS IS" BASIS.  THE AUTHOR PROVIDES NO WARRANTY
  1058. WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK, INCLUDING WARRANTIES
  1059. WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.
  1060.  
  1061. ==============================================================================
  1062.  
  1063. [1.5] Trademarks
  1064.  
  1065.  * Java is a trademark of Sun Microsystems, Inc. in the United States and other
  1066.    countries.
  1067.  * All other trademarks are the property of their respective owners.
  1068.  
  1069. Note: We'd like to list all trademarks explicitly; please let us know about who
  1070. owns what trademark and we'll name them explicitly; thanks!
  1071.  
  1072. ==============================================================================
  1073.  
  1074. [1.6] C++-FAQ-Lite != C++-FAQ-Book
  1075.  
  1076. This document, C++ FAQ Lite, is not the same as the C++ FAQ Book.  The book
  1077. (C++ FAQ, Second Edition, Cline, Lomow, and Girou, Addison-Wesley) is 500%
  1078. larger than this document, and is available in bookstores.  See [3] for
  1079. details.
  1080.  
  1081. ==============================================================================
  1082.  
  1083. SECTION [2]: On-line sites that distribute this document
  1084.  
  1085.  
  1086. [2.1] Where's the closest mirror site to access this document? [UPDATED!]
  1087.  
  1088. [Recently changed the rationale for choosing a close site thanks to Stan Brown
  1089. (on 1/00).]
  1090.  
  1091. You'll probably reduce overall 'net traffic a bit by choosing a close site:
  1092.  * USA: marshall-cline.home.att.net/cpp-faq-lite/
  1093.  * USA #2: www.awtechnologies.com/bytes/c++/faq-lite/
  1094.  * Canada: new-brunswick.net/workshop/c++/faq
  1095.  * Finland: www.utu.fi/~sisasa/oasis/cppfaq/
  1096.  * France: caor.ensmp.fr/FAQ/c++-faq-lite/
  1097.  * Germany: www.informatik.uni-konstanz.de/~kuehl/cpp/cppfaq.htm
  1098.  * Ireland: snet.wit.ie/GreenSpirit/c++-faq-lite/
  1099.  * Spain: geneura.ugr.es/~jmerelo/c++-faq/
  1100.  * Taiwan: www.cis.nctu.edu.tw/c++/C++FAQ-English/
  1101.  
  1102. ==============================================================================
  1103.  
  1104. [2.2] How can I get a Copy of all the HTML files of C++ FAQ Lite so I can read
  1105.       them Off-Line?
  1106.  
  1107. Here's how you can get a bundled and compressed copy of the HTML files of C++
  1108. FAQ Lite e-mailed to you:
  1109.  
  1110.  1. Select a format (.zip is common on Windows and the Mac, .tar.Z and .tar.gz
  1111.     are common on UNIX), then  send an e-mail message to
  1112.     cline-cpp-faq-html-zip@crynwr.com (for .zip),
  1113.     cline-cpp-faq-html-tarz@crynwr.com (for .tar.Z), or
  1114.     cline-cpp-faq-html-targz@crynwr.com (for .tar.gz) [the contents and
  1115.     Subject: of the email message are irrelevant].
  1116.  
  1117.  2. Wait a few minutes, then check your e-mail.  If you don't receive an e-mail
  1118.     message containing the bundled FAQ, wait a while longer and check again.
  1119.     If you still haven't received it after waiting an entire day, something is
  1120.     wrong and you can send me e-mail or try again.
  1121.  
  1122.  3. Once you receive the FAQ in your e-mail, unpack the FAQ using the
  1123.     instructions contained in the associated e-mail message.
  1124.  
  1125. Restriction: you must still abide by the Copyright Notice[1.2] and Copying
  1126. Permissions[1.3].  In particular, you must not redistribute C++ FAQ Lite to
  1127. others without permission from the author[1.1].  If you want to redistribute
  1128. C++ FAQ Lite to someone else, the easiest way is to tell them about this
  1129. one-click download feature[2.2], and let them get their own copy.
  1130.  
  1131. Restriction: the FAQ uses "long filenames." If your machine can't handle long
  1132. filenames (e.g., if it's DOS and/or Windows 3.x), you cannot unpack the FAQ.
  1133. UNIX, Windows NT, Windows 95, Windows 98, and Mac all handle long filenames
  1134. correctly.
  1135.  
  1136. Note: e-mail was selected over FTP or HTTP[2.4].
  1137.  
  1138. ==============================================================================
  1139.  
  1140. [2.3] How can I get a Copy of all the "plaintext" files of C++ FAQ Lite so I
  1141.       can read them Off-Line?
  1142.  
  1143. The "plaintext" version of C++ FAQ Lite is posted monthly on comp.lang.c++.
  1144. These simple text files are mechanically produced by stripping the HTML tags
  1145. from the HTML files on the Web site
  1146. <http://marshall-cline.home.att.net/cpp-faq-lite/>.  Therefore the plaintext files
  1147. aren't as pretty to look at and don't have the hyper-linked cross references,
  1148. but they have basically the same information as the HTML files.
  1149.  
  1150. Here's how you can get a bundled and compressed copy of the plaintext files of
  1151. C++ FAQ Lite e-mailed to you:
  1152.  
  1153.  1. Select a format (.zip is common on Windows and the Mac, .tar.Z and .tar.gz
  1154.     are common on UNIX), then  send an e-mail message to
  1155.     cline-cpp-faq-plaintext-zip@crynwr.com (for .zip),
  1156.     cline-cpp-faq-plaintext-tarz@crynwr.com (for .tar.Z), or
  1157.     cline-cpp-faq-plaintext-targz@crynwr.com (for .tar.gz) [the contents and
  1158.     Subject: of the email message are irrelevant].
  1159.  
  1160.  2. Wait a few minutes, then check your e-mail.  If you don't receive an e-mail
  1161.     message containing the bundled FAQ, wait a while longer and check again.
  1162.     If you still haven't received it after waiting an entire day, something is
  1163.     wrong and you can send me e-mail or try again.
  1164.  
  1165.  3. Once you receive the FAQ in your e-mail, unpack the FAQ using the
  1166.     instructions contained in the associated e-mail message.
  1167.  
  1168. Restriction: you must still abide by the Copyright Notice[1.2] and Copying
  1169. Permissions[1.3].  In particular, you must not redistribute C++ FAQ Lite to
  1170. others without permission from the author[1.1].  If you want to redistribute
  1171. C++ FAQ Lite to someone else, the easiest way is to tell them about this
  1172. one-click download feature[2.3], and let them get their own copy.
  1173.  
  1174. Note: e-mail was selected over FTP or HTTP[2.4].
  1175.  
  1176. ==============================================================================
  1177.  
  1178. [2.4] Why is the download via email? Why not via ftp? [UPDATED!]
  1179.  
  1180. [Recently added caveat that out-of-date reminders aren't implemented yet thanks
  1181. to Stan Brown (on 1/00).]
  1182.  
  1183. Using FTP or HTTP would have a "cache coherency" problem.
  1184.  
  1185. Over the years I've noticed that there are a lot of out-of-date (nay, ancient)
  1186. copies of C++ FAQ Lite floating around the Internet.  This has caused a lot of
  1187. confusion since these ancient versions often contained bugs, missed features,
  1188. and generally outdated information.  Not only has it caused confusion for many,
  1189. it has resulted in a plethora of worthless email in my inbox.  I couldn't ever
  1190. seem to get "over the hump": no matter how clear I made the current version,
  1191. hundreds (perhaps thousands) of people were unaware that they were reading an
  1192. outdated version.  That made it harder for both them and me.
  1193.  
  1194. By downloading the C++ FAQ Lite via email rather than ftp, I'm able to provide
  1195. an extra service for people: the robot mailer (the Perl script that sends the
  1196. FAQ copies to everyone) remembers which version of the FAQ each person has, and
  1197. when someone's version becomes out of date, the robot will send them a courtesy
  1198. email.  Something like, "Your copy of the FAQ is out of date; if you want to
  1199. upgrade, click here".  (Note: I haven't built this feature yet; please be
  1200. patient.)
  1201.  
  1202. The goal is to help you keep up-to-date, so you won't end up reading outdated
  1203. information.  And also to keep my inbox from getting flooded with questions
  1204. from confused readers who are reading a copy of the FAQ written before they
  1205. discovered Fire.
  1206.  
  1207. So please please don't send me e-mail asking for an FTP address since there
  1208. isn't one.  Thanks!
  1209.  
  1210. ==============================================================================
  1211.  
  1212. [2.5] Where can I download a Chinese translation of this on-line document?
  1213.  
  1214. www.cis.nctu.edu.tw/c++/C++FAQ-Chinese/ contains a Chinese translation encoded
  1215. in the "Big5" code.  Note: "Big5" is a 16-bit Chinese code used mostly in
  1216. Taiwan.
  1217.  
  1218. ==============================================================================
  1219.  
  1220. [2.6] Where can I download a Portuguese translation of this on-line document?
  1221.       [UPDATED!]
  1222.  
  1223. [Recently updated the URL for the Portuguese translation of the FAQ thanks to
  1224. Ricardo F. de Oliveira (on 3/00).]
  1225.  
  1226. www.mathematica.com.br/CPPFL00.htm contains a Portuguese translation of the
  1227. FAQ.
  1228.  
  1229. ==============================================================================
  1230.  
  1231. [2.7] Where can I download a French translation of this on-line document?
  1232.  
  1233. www.ifrance.com/jlecomte/c++/c++-faq-lite/ contains a French translation of the
  1234. FAQ.
  1235.  
  1236. ==============================================================================
  1237.  
  1238. SECTION [3]: C++-FAQ-Book versus C++-FAQ-Lite
  1239.  
  1240.  
  1241. [3.1] Is there a C++ FAQ Book in addition to the C++ FAQ Lite? [UPDATED!]
  1242.  
  1243. [Recently rewrote (on 3/00).]
  1244.  
  1245. Yes, the book is C++ FAQs by Cline, Lomow, and Girou, Addison-Wesley, 1999,
  1246. ISBN 0-201-30983-1.
  1247.  
  1248. The book has achieved a five-star rating ([[*****]]) on Amazon.com, and is
  1249. available in bookstores.  Here is the book at Amazon.com
  1250. <http://www.amazon.com/exec/obidos/ASIN/0201309831>, and here is the book at
  1251. BarnesAndNoble.com
  1252. <http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0201309831>.
  1253.  
  1254. Here are some excerpts <http://www.awl.com/cseng/titles/0-201-30983-1>.
  1255.  
  1256. (CENTER([[Book Cover]]
  1257. <http://www.awl.com/cseng/titles/0-201-30983-1/0201309831.A.jpg>)CENTER)
  1258.  
  1259. ==============================================================================
  1260.  
  1261. [3.2] Is there a big difference between C++ FAQ Lite and C++ FAQ Book?
  1262.       [UPDATED!]
  1263.  
  1264. [Recently rewrote (on 3/00).]
  1265.  
  1266. Yes there is a big difference.
  1267.  
  1268. At last count, the C++ FAQ Book is 500% larger than the C++ FAQ Lite.
  1269.  
  1270. Bottom line: the book and this Lite document are not the same.  The book is
  1271. both broader and deeper -- it covers subjects that aren't covered in this Lite
  1272. document, and it covers subjects in more detail than this Lite document.
  1273.  
  1274. In addition, the book has lots and lots of programming examples -- much more
  1275. than are in this Lite document.
  1276.  
  1277. ==============================================================================
  1278.  
  1279. [3.3] How can I download an electronic copy of the C++ FAQ Book? [UPDATED!]
  1280.  
  1281. [Recently rewrote (on 3/00).]
  1282.  
  1283. The book is available in paper form only.
  1284.  
  1285. You can buy it at bookstores (such as at Amazon.com
  1286. <http://www.amazon.com/exec/obidos/ASIN/0201309831> or at BarnesAndNoble.com
  1287. <http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0201309831>).
  1288.  
  1289. ==============================================================================
  1290.  
  1291. -- 
  1292. Marshall Cline / 972-931-9470 / mailto:cline@parashift.com
  1293.