FAQs in section [4]:
[4.1] What updates were made for the 10/05 release? New!
[Recently created (in 10/05). Click here to go to the next FAQ in the "chain" of recent changes.]
9 New FAQs:
4 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.2] What updates were made for the 07/05 release? New!
[Recently created (in 7/05). Click here to go to the next FAQ in the "chain" of recent changes.]
1 New FAQs:
3 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.3] What updates were made for the 06/05 release?
2 New FAQs:
7 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.4] What updates were made for the 05/05 release?
Generic changes:
- Reworked the lists of mirror sites and translations on the opening page.
4 New FAQs:
4 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.5] What updates were made for the 04/05 release?
5 New FAQs:
18 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.6] What updates were made for the 03/05 release?
9 New FAQs:
23 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.7] What updates were made for the 02/05 release?
Generic changes:
6 New FAQs:
23 Changed FAQs:
- [5.9] Which newsgroup should I post my questions?
(added a link to TechiWarehouse thanks to Adam Fisher)
- [9.3] Do inline functions improve performance?
(added two bullets on cache misses thanks to a suggestion from Tom Brown)
- [10.6] Should my constructors use "initialization lists" or "assignment"?
(added an "or when" and a cross reference to the last paragraph, plus fixed some grammar, thanks to Padmanabhan V. Karthic)
- [10.8] What is the "Named Constructor Idiom"?
(added the last paragraph to discuss the return-by-value optimization thanks to a question from Can Isin)
- [10.18] What is the "Named Parameter Idiom"?
(changed friend File; to friend class File; thanks to Mehri and Padmanabhan V. Karthic)
- [10.19] Why am I getting an error after declaring a Foo object via Foo x(Bar())?
(added the alternate syntax Foo x = Bar(); thanks to a suggestion from Mike Dunn)
- [13.13] Should I design my classes from the outside (interfaces first) or from the inside (data first)?
(changed friend LinkedList; to friend class LinkedList;, and similarly with LinkedListIterator, thanks to Padmanabhan V. Karthic)
- [16.19] What's another way to build a Matrix template?
(added some pros/cons (mostly pros) thanks to a suggestion from Padmanabhan V. Karthic)
- [16.22] How do I do simple reference counting?
(changed friend FredPtr; to friend class FredPtr; thanks to Padmanabhan V. Karthic)
- [16.24] How do I provide reference counting with copy-on-write semantics for a hierarchy of classes?
(changed friend Fred; to friend class Fred; thanks to Padmanabhan V. Karthic)
- [17.7] What should I catch?
(fixed a grammatical error thanks to Padmanabhan V. Karthic)
- [17.12] Exception handling seems to make my life more difficult; clearly I'm not the problem, am I??
(rewrote the last bullet thanks to a critique of the old wording from Jan Ploski)
- [18.15] Why does the compiler allow me to change an int after I've pointed at it with a const int*?
(initialized variable x in main() thanks to Yechiel Kimchi )
- [27.13] Are there any other sources of coding standards?
(hoisted the Sutter/Alexandrescu book out to its proper, primary place; also added (thanks to Kevlin Henney) links to and insights about Elemtel and Industrial Strength C++)
- [29.5] What are the criteria for choosing between short / int / long data types?
(added the disclaimer that <stdint.h> is not part of the C++ standard and might not be supplied by your compiler vendor thanks to Padmanabhan V. Karthic)
- [29.18] What is the type of an enumeration such as enum Color? Is it of type int?
(fixed a typo thanks to Surendra Phadke and Brandon Forehand)
- [30.5] What are the practical consequences of differences in Smalltalk/C++ inheritance?
(fixed the spelling of Maserati thanks to Alessandro/Gruppo Visione)
- [33.2] How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc?
(fixed a grammatical error thanks to Padmanabhan V. Karthic)
- [33.5] How can I avoid syntax errors when calling a member function using a pointer-to-member-function?
(added return value (int ans = ...) to make the sample-code more illustrative thanks to Pete Brunet)
- [33.10] What the heck is a functionoid, and why would I use one?
(added a virtual dtor thanks to Marcus; added parameters to doit() thanks to Dirk Bonekaemper; made the dtor pure virtual as an optimization)
- [35.18] Why am I getting errors when my template-derived-class accesses something it inherited from its template-base-class?
(added public: thanks to Alexander Kamotsky and Leonard "SoulSkorpion" Frankel and Stefan Näwe; fixed a grammatical error thanks to Val Kartchner)
- [39.4] What should be done with macros that contain if?
(clarified why we use the (void)0 part thanks to a suggestion from Padmanabhan V. Karthic)
- [40.1] How can I generate HTML documentation for my classes? Does C++ have anything similar to javadoc?
(updated the link to www.robertnz.net/cpp_site.html#Documentation thanks to Robert Davies and Peter Kammer)
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.8] What updates were made for the 12/04 release?
Generic changes:
- In an attempt to stem the inexorable tide of spam, I've obfuscated the
email address of anyone who's contributed to the FAQ. The email addresses are
easy to decode, e.g., (NOSPAM)marshall(DASH)cline(AT)parashift(DOT)com
becomes marshall-cline@parashift.com, though hopefully the spam-bots
won't bother (yea right).
3 New FAQs:
9 Changed FAQs:
- [2.2] What happened to the one-click-download option?
(added request to stop emailing me requests to send it manually)
- [5.2] How do I get other people to do my homework problem for me?
(duplicated the "Jack Klein" attribution that was in the recent changes section thanks to Daryle Walker)
- [6.5] Is C++ better than Ada? (or Visual Basic, C, FORTRAN, Pascal, Smalltalk, or any other language?)
(fixed a spelling error thanks to Gerriet Backer)
- [21.8] But I have a Ph.D. in Mathematics, and I'm sure a Circle is a kind of an Ellipse! Does this mean Marshall Cline is stupid? Or that C++ is stupid? Or that OO is stupid?
(added the paragraph on constant Ellipses thanks to Luke Palmer)
- [23.9] What's the meaning of, Warning: Derived::f(char) hides Base::f(double)?
(included a new example, changed the parameter types so the behavior seems more bizarre/ominous, and added a note about warnings not being standardized, thanks to Daniel Kabs)
- [25.3] So there are times when multiple inheritance isn't bad?!??
(fixed a typo thanks to Sumit Rajan)
- [27.1] What are some good C++ coding standards?
(added last few sentences on the Sutter/Alexandrescu book)
- [27.13] Are there any other sources of coding standards?
(added a bullet on the Sutter/Alexandrescu book)
- [28.4] Should I buy one book, or several?
(added last few sentences recommending purchase of a coding-standards book)
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.9] What updates were made for the 06/04 release?
Polish translation:
16 New FAQs:
32 Changed FAQs:
- [2.4] Where can I find the C++ FAQ Lite translated into Chinese?
(updated the URL for the GB-encoded translation thanks to Imron Alston)
- [6.5] Is C++ better than Ada? (or Visual Basic, C, FORTRAN, Pascal, Smalltalk, or any other language?)
(added to the last paragraph to make it stronger(!!))
- [6.13] Where can I get a copy of the ANSI/ISO C++ standard?
(rewrote from scratch, thanks to comments and corrections from Petter Häggholm, Lars Christensen, Pieter Van Dyck and Jim Fischer)
- [6.15] What does the FAQ mean by "such and such is evil"?
(changed "such-in-such" to "such and such" thanks to Darren Frith and Simon OLeary)
- [8.4] What does object.method1().method2() mean?
(removed a couple superfluous ")"s)
- [10.3] Can one constructor of a class call another constructor of the same class to initialize the this object?
(added a strong statement against using placement new in this situation thanks to questions from Marc Page and Steve Peters)
- [10.6] Should my constructors use "initialization lists" or "assignment"?
(fixed a (subtle!) miswording in the second paragraph thanks to Tomek Bywalec, Bartek Krzemien and Tian Yu; added the stuff on exceptions (see last paragraph) thanks to Alf Steinbach)
- [10.18] What is the "Named Parameter Idiom"?
(added a bunch more example code and clarified the explanation of class OpenFile thanks to Tomek Bywalec and Bartek Krzemien)
- [12.1] What is "self assignment"?
(fixed an error in the code-comments thanks to Jonathan Mcdougall)
- [13.10] How do I create a subscript operator for a Matrix class?
(fixed a typo thanks to Doug Schwartz)
- [15.1] Why should I use <iostream> instead of the traditional <cstdio>?
(removed a superfluous ")")
- [15.9] But shouldn't I always use a printOn() method rather than a friend function?
(removed a superfluous ")")
- [15.17] How can I tell {if a key, which key} was pressed before the user presses the ENTER key?
(updated the URL thanks to Sampath Patnala)
- [15.18] How can I make it so keys pressed by users are not echoed on the screen?
(fixed the title thanks to Todd Catelotti)
- [16.6] Do I need to check for NULL after p = new Fred()?
(added a caveat for MSVC++ thanks to Graham Knap)
- [20.8] What is a "virtual constructor"?
(rewrote the last paragraph for clarity)
- [21.2] Converting Derived* → Base* works OK; why doesn't Derived** → Base** work?
(fixed a grammatical error thanks to Philip S Tellis)
- [22.5] How do you define a copy constructor or assignment operator for a class that contains a pointer to a (abstract) base class?
(added a "contract" to the Fred ctor thanks to Bo Majewski; changed the return types in the derived classes to exploit covariant return types thanks to Dan Raviv)
- [23.11] How can I set up my class so it won't be inherited from?
(fixed a bug in the friend declaration, renamed the classes to Fred and FredBase, and general wordsmithing)
- [28.7] What are some best-of-breed C++ programming-by-example guides?
(added details about Musser and Saini thanks to Randy Sherman)
- [29.5] What are the criteria for choosing between short / int / long data types?
(added stuff about <stdint.h> thanks to Oliver Kellogg)
- [29.18] What is the type of an enumeration such as enum Color? Is it of type int?
(added the caveat about converting only valid integers to enumerations thanks to Mike Radford)
- [33.2] How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc?
(added caveat about using extern "C" non-member function thanks to Rolf Magnus)
- [33.4] Why am I having trouble taking the address of a C++ function?
(rewrote the opening paragraph to give a better explanation of the "short answer")
- [35.13] How can I avoid linker errors with my template functions?
(added a note about the export keyword thanks to Greg Comeau)
- [35.15] How can I avoid linker errors with my template classes?
(added a note about the export keyword thanks to Greg Comeau)
- [35.16] Why do I get linker errors when I use template friends?
(added the required <> within the friend declaration thanks to Christophe Barbe; added the "define it within the class body" approach thanks to Frode Angell-Petersen AKA Sprudling)
- [36.10] How do I serialize objects that contain pointers to other objects, but those pointers form a tree with no cycles and only "trivial" joins?
(fixed some spelling errors thanks to Steve Fallows)
- [38.13] Is it possible to convert C++ to C?
(added LLVM thanks to Chris Sabre)
- [39.4] What should be done with macros that contain if?
(modified the primary solution to include (void)0, and thanks to Erik Haugen and Mike Morearty, added some pros/cons commentary to the secondary solution; plus did some general wordsmithing)
- [39.5] What should be done with macros that have multiple lines?
(modified the primary solution to include (void)0, and thanks to Erik Haugen and Mike Morearty, added some pros/cons commentary to the secondary solution; plus did some general wordsmithing)
- [39.7] Why can't the compiler find my header file in #include "c:\test.h" ?
(softened the wording to reflect the difference between header-names and string-literals thanks to Michiel Salters)
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.10] What updates were made for the 08/03 release?
1 New FAQs:
10 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.11] What updates were made for the 06/03 release?
2 New FAQs:
13 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.12] What updates were made for the 05/03 release?
1 New FAQs:
5 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.13] What updates were made for the 04/03 release?
1 New FAQs:
13 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.14] What updates were made for the 03/03 release?
1 New FAQs:
4 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.15] What updates were made for the 02/03 release?
4 New FAQs:
12 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.16] What updates were made for the 01/03 release?
9 New FAQs:
16 Changed FAQs:
[ Top | Bottom | Previous section | Next section | Search the FAQ ]
[4.17] What updates were made for the 12/02 release?
Big-picture changes:
34 New FAQs: