(Click here for a personal note from Marshall Cline.)
C++ FAQ
/
Section 4
/ FAQ 4.23
Section 4:
4.1
Updates for the 03/12 release?
New!
4.2
Updates for the 11/11 release?
New!
4.3
Updates for the 07/11 release?
4.4
Updates for the 05/11 release?
4.5
Updates for the 03/11 release?
4.6
Updates for the 08/10 release?
4.7
Updates for the 06/10 release?
4.8
Updates for the 05/10 release?
4.9
Updates for the 04/10 release?
4.10
Updates for the 03/10 release?
4.11
Updates for the 01/10 release?
4.12
Updates for the 09/09 release?
4.13
Updates for the 06/09 release?
4.14
Updates for the 01/09 release?
4.15
Updates for the 03/07 release?
4.16
Updates for the 09/06 release?
4.17
Updates for the 03/06 release?
4.18
Updates for the 10/05 release?
4.19
Updates for the 07/05 release?
4.20
Updates for the 06/05 release?
4.21
Updates for the 05/05 release?
4.22
Updates for the 04/05 release?
4.23
Updates for the 03/05 release?
4.24
Updates for the 02/05 release?
4.25
Updates for the 12/04 release?
4.26
Updates for the 06/04 release?
4.27
Updates for the 08/03 release?
4.28
Updates for the 06/03 release?
4.29
Updates for the 05/03 release?
4.30
Updates for the 04/03 release?
4.31
Updates for the 03/03 release?
4.32
Updates for the 02/03 release?
4.33
Updates for the 01/03 release?
4.34
Updates for the 12/02 release?
4.35
Updates for the 09/02 release?
4.36
Updates for the 06/02 release?
4.37
Updates for the 05/02 release?
4.38
Updates for the 04/02 release?
4.39
Updates for the 03/02 release?
4.40
Updates for the 08/01 release?
4.41
Updates for the 04/01 release?
4.42
Updates for the 07/00 release?
4.43
Updates for the 03/00 release?
4.44
Updates for the 01/00 release?
4.45
Updates for the 10/99 release?
4.46
Updates for the 07/99 release?
4.47
Updates for the 06/98 release?
4.48
Updates for the 05/98 release?
4.49
Updates for the 09/97 release?
4.50
Updates for the 01/97 release?
4.51
Updates for the 11/96 release?
4.52
Updates for the 10/96 release?
4.53
Updates for the 09/96 release?
4.54
Updates for the 08/96 release?
4.55
Updates for the 07/96 release?
4.56
Updates for the 06/96 release?
4.57
Updates for the 05/96 release?
4.58
Updates for the 04/96 release?
4.59
Updates for the 03/96 release?
4.60
Updates for the 09/95 release?
4.61
Updates for the 06/95 release?
4.62
Updates for the 04/95 release?
4.63
Updates for the 03/95 release?
4.64
Updates for the 01/95 release?
4.65
Updates for the 12/94 release?
4.66
Updates for the 11/94 release?
4.67
Updates for the 08/94 release?
4.68
Updates for the 08/94 release?
[4.23] What updates were made for the 03/05 release?
9 New FAQs:
[2.9] Where can I find the C++ FAQ translated into Greek?
(created with much thanks to translator
Vangelis Katsikaros
)
[2.16] Where can I find the C++ FAQ translated into Turkish?
(created with much thanks to translator
Doruk Caner
)
[4.23] What updates were made for the 03/05 release?
(created)
[16.2] Is it safe to
delete
the same pointer twice?
(created promted by a question from
Hans Van den Eynden
)
[18.11] What's the relationship between a return-by-reference and a
const
member function?
(created)
[18.12] What's the deal with "
const
-overloading"?
(created)
[20.4] What happens in the hardware when I call a virtual function? How many layers of indirection are there? How much overhead is there?
(created)
[20.5] How can a member function in my derived class call the same function from its base class?
(created)
[23.7] I'm getting the same mess with destructors: calling a
virtual
on my
this
object from my base class's destructor ends up ignoring the override in the derived class; what's going on?
(created)
23 Changed FAQs:
[5.9] Which newsgroup should I post my questions?
(added
microsoft.public.dotnet.languages.vc
thanks to
Ioannis Vranos
)
[5.10] Should I post job advertisements and/or resumés on
comp.lang.c++
?
(duplicated the attribution that was in the
recent changes section
thanks to
Daryle Walker
)
[5.11] What if I really need a job; should I post my resumé on
comp.lang.c++
?
(duplicated the attribution that was in the
recent changes section
thanks to
Daryle Walker
)
[6.13] Where can I get a copy of the ANSI/ISO C++ standard?
(updated
the Barnes & Noble URL
)
[10.5] Which constructor gets called when I create an array of
Fred
objects?
(added the paragraph on placement-new thanks to
Alf P. Steinbach
; rewrote the other examples)
[10.6] Should my constructors use "initialization lists" or "assignment"?
(added "non-static reference" to the list of data members that must appear within an initialization list thanks to
Daryle Walker
)
[10.15] How do I prevent the "
static
initialization order fiasco"?
(changed
*.hpp
to
*.h
)
[10.16] Why doesn't the construct-on-first-use idiom use a static object instead of a static pointer?
(changed
*.hpp
to
*.h
)
[10.17] How do I prevent the "
static
initialization order fiasco" for my
static
data members?
(changed
*.hpp
to
*.h
)
[12.1] What is "self assignment"?
(changed
*.hpp
to
*.h
)
[16.18] But the above
Matrix
class is specific to
Fred
! Isn't there a way to make it generic?
(changed
*.hpp
to
*.h
)
[19.8] I've been told to never use protected data, and instead to always use private data with protected access functions. Is that a good rule?
(added the goal of providing a coherent/opaque interface to the goals of data hiding thanks to
Yechiel Kimchi
)
[23.1] Is it okay for a non-
virtual
function of the base class to call a
virtual
function?
(changed
*.hpp
to
*.h
)
[23.9] What's the meaning of,
Warning: Derived::f(char) hides Base::f(double)
?
(added the paragraph on "hiding happens when you have a derived-pointer, not when you have a base-pointer" thanks to
Daniel Kabs
)
[26.6] I'm sooooo confused. Would you please go over the rules about bytes,
char
s, and characters one more time?
(fixed a spelling error thanks to
Daryle Walker
)
[26.10] Can I define an operator overload that works with built-in / intrinsic / primitive types?
(added "or enumeration type" to the first sentence thanks to
Daryle Walker
)
[29.20] If an enumeration type is distinct from any other type, what good is it? What can you do with it?
(added the caveat on the last line of code thanks to
Daryle Walker
)
[32.1] What do I need to know when mixing C and C++ code?
(added a caveat about some of the requirements depending on your compiler-vendor thanks to
Mitchell Charity
)
[34.3] Is the storage for a
std::vector<T>
guaranteed to be contiguous?
(changed
&v[0]
to
v.empty() ? NULL : &v[0]
thanks to
David Hilsee
)
[35.15] How can I avoid linker errors with my template classes?
Updated!
(fixed a bug by changing
template Foo<int>
to
template class Foo<int>
thanks to alert readers
Eric Gorr
and
Patrick Guio
)
[37.9] Where can I get tons and tons of more information on C++ class libraries?
(fixed the URL to
www.mathtools.net/C_C__
thanks to
Daryle Walker
)
[39.7] Why can't the compiler find my header file in
#include "c:\test.h"
?
(changed
*.hpp
to
*.h
)
[40.3] Are there any pretty-printers that reformat C++ source code?
(fixed the URL to C++2LaTeX thanks to
Daryle Walker
and
Nicolás Conde
)