C++ FAQ
/ Topics beginning with 'D'
Recent changes - 11 changed FAQs.
In a list,
or in a chain,
or here:
[4.1],
[4.2],
[6.3],
[6.12],
[10.3],
[15.22],
[27.15],
[35.13],
[35.14],
[35.15],
[39.6].
Translated into 16 languages.
English,
Belorussian / Minsk,
Bosnian / Serbian / Croatian,
Bulgarian,
Chinese (GB, Mainland),
Chinese (Big5, Taiwan),
French,
German,
Greek,
Korean,
Polish,
Portuguese,
Romanian,
Russian,
Spanish,
Turkish.
Mirrored in 11 countries.
USA,
France,
Germany,
Ireland,
Israel,
Italy,
Poland,
Portugal,
Spain,
Taiwan,
U.K..
|
C++ FAQ topics beginning with 'D'
[ A
| B
| C
| D
| E
| F
| G
| H
| I
| J
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
| Z
]
- Dangerous programming practices ...
[6.15]
- Arrays ...
[16.17],
[17.11],
[21.5],
[34.1]
- Casting Derived** → Base** ...
[21.2]
- Casting Foo** → Foo const** ...
[18.17]
- Casting pointers ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- char* (use a string-like class instead) ...
[13.6],
[17.11]
- Converting array-of-Derived → kind-of Array-of-Base ...
[21.4]
- Derived** → Base**, Casting ...
[21.2]
- Explicitly calling destructors (sometimes okay) ...
[11.10]
- Explicitly calling destructors on local objects ...
[11.5],
[11.6]
- Foo** → Foo const**, Casting ...
[18.17]
- Hiding inherited public features ...
[21.1],
[21.6],
[21.7],
[21.8],
[21.9],
[23.9]
- Macros ...
[9.5],
[29.11],
[30.3],
[39.4],
[39.5],
[39.6]
- Missing virtual on some base class dtors ...
[20.7]
- Mixing malloc() and delete ...
[16.3]
- Mixing new and free() ...
[16.3]
- Mixing new T[n] with delete p ...
[16.12],
[16.13],
[26.11]
- Mixing realloc() and new ...
[16.5]
- Passing array-of-Derived as array-of-Base ...
[21.4],
[21.5]
- Pointer casts ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- Preprocessor ...
[29.8]
- Unnecessary global variables ...
[33.2],
[39.8]
- Unnecessary use of "dumb" pointers ...
[34.6]
- Dangerous: pure technical definitions of "good" ...
[6.17]
- Dangling else ...
[39.4]
- Dangling pointer ...
[12.2],
[16.25],
[34.6]
- Death by heap corruption ...
[16.12],
[30.3],
[38.7],
[38.8]
- Death: dtor called at object's ...
[11.1]
- Deciding which operators should be overloaded ...
[13.8]
- Decision logic, avoiding ...
[20.6]
- Decision-making
- Business issues dominate technical issues ...
[6.17]
- Must optimize important things: schedule + cost + risk ...
[23.3]
- One size does not fit all ...
[6.16],
[6.17],
[9.3],
[17.5],
[17.8],
[18.8],
[18.9],
[19.8],
[21.8],
[23.3],
[23.4],
[25.2],
[25.3],
[25.5],
[25.6],
[29.7],
[29.11],
[36.2],
[36.3],
[36.5],
[36.6]
- One size does not fit all@ ...
[6.16],
[6.17],
[9.3],
[17.5],
[17.8],
[18.8],
[18.9],
[19.8],
[21.8],
[23.3],
[23.4],
[25.2],
[25.3],
[25.5],
[25.6],
[29.7],
[29.11],
[36.2],
[36.3],
[36.5],
[36.6]
- Software development is ...
[6.16],
[9.3],
[17.8],
[19.8],
[19.9],
[21.8],
[23.4],
[25.2],
[25.3],
[25.5],
[25.6],
[29.7],
[29.11],
[36.2],
[36.3],
[36.5],
[36.6]
- Declaration: using-declaration ...
[27.5]
- Declarations
- Declare near first use ...
[27.7]
- Function declarations ...
[29.4]
- List x(); declares a function, not an object ...
[10.2]
- Declarations, forward (see also under Templates) ...
[39.14]
- Declarations, forward ...
[39.11]
- Decompiling executables back into C++ source code ...
[38.4]
- Decrement operators operator-- (see also Operator overloading) ...
[13.14],
[13.15]
- Deducing template types (see also under Templates) ...
[35.4]
- Deducing template types ...
[35.4]
- Default code, non-abstract function is ...
[20.6]
- Default code, non-pure virtual function is ...
[20.6]
- Default constructors ...
[10.4],
[10.5],
[10.21]
- Default parameters ...
[10.3]
- #define macros
- Evil but sometimes useful ...
[32.4],
[33.6],
[33.7]
- Evil! ...
[9.5],
[29.11],
[30.3],
[39.4],
[39.5],
[39.6]
- Prefer const vs. #define ...
[29.7]
- See also Inline functions ...
[9.1],
[9.5],
[28.2],
[30.3],
[32.4],
[33.7]
- Use them when declaring member-function pointers ...
[33.6]
- with if ...
[39.4]
- with multiple lines ...
[39.5]
- with token pasting ...
[39.6]
- define macros
- Evil but sometimes useful ...
[32.4],
[33.6],
[33.7]
- Evil! ...
[9.5],
[29.11],
[30.3],
[39.4],
[39.5],
[39.6]
- Prefer const vs. #define ...
[29.7]
- See also Inline functions ...
[9.1],
[9.5],
[28.2],
[30.3],
[32.4],
[33.7]
- Use them when declaring member-function pointers ...
[33.6]
- with if ...
[39.4]
- with multiple lines ...
[39.5]
- with token pasting ...
[39.6]
- Definition (vs. declaration) ...
[9.9]
- Definition of "evil" ...
[6.15]
- Definition of "FAQ" ...
[6.18]
- Definition of "good" must not be purely technical ...
[6.17]
- Definition vs. declaration (see also under Templates) ...
[35.12],
[35.13],
[35.14],
[35.15]
- Definition vs. declaration of templates ...
[35.12],
[35.13],
[35.14],
[35.15]
- Deinitialization of a static member datum ...
[10.16]
- Delegate to a sister class via virtual inheritance ...
[25.10]
- delete ...
[16],
[16.1]
- Allocating an array with new T[n] ...
[16.11]
- Automatically freed on program exit ...
[10.16]
- Automating a NULL test ...
[16.7]
- Breaking it into pools ...
[11.14]
- Corruption — bang, you're dead ...
[16.12],
[30.3],
[38.7],
[38.8]
- delete and free() might use different heaps ...
[16.9],
[16.10]
- delete handles NULL automatically ...
[16.8]
- delete has two steps ...
[16.9]
- delete p actually deletes *p, not p ...
[16.1]
- delete this ...
[16.15]
- delete[] uses magic ...
[16.14],
[38.7],
[38.8]
- delete[] vs. delete ...
[16.12]
- delete[] vs. delete for built-in types ...
[16.13],
[26.11]
- Deleting an array with delete[] ...
[16.11]
- Difference between delete and delete[] ...
[13.10],
[16.3],
[16.11]
- Double-delete-disaster ...
[16.2]
- Garbage collectors ...
[16.26],
[16.27],
[16.28]
- Might use different heap from free() ...
[16.9]
- Mixing malloc() and delete ...
[16.3]
- Mixing new and free() ...
[16.3]
- Mixing with malloc() ...
[16.3]
- Multi-dimensional arrays ...
[16.16],
[16.17]
- new and malloc() might use different heaps ...
[16.5]
- new has two steps ...
[16.10]
- new never returns NULL ...
[16.6]
- Placement new ...
[16.10]
- Placement new doesn't allocate ...
[11.10]
- Prohibiting local objects ...
[16.21]
- realloc() ...
[16.5]
- Reference counting ...
[16.22],
[16.23],
[16.24],
[16.25]
- Runtime costs of ...
[31.2],
[31.4],
[31.5]
- std::bad_alloc ...
[16.6],
[16.7]
- std::set_new_handler ...
[16.7]
- Use std::auto_ptr only when pointing into the heap ...
[23.6]
- Why use new rather than malloc() ...
[16.4]
- delete keyword ...
[13.10],
[16.9],
[16.11],
[16.12],
[16.14],
[16.15],
[38.7]
- Demand-paged virtual-memory operating-systems ...
[9.3]
- Dependent member-names (see also under Templates) ...
[35.19],
[35.20]
- Dependent type-names (see also under Templates) ...
[35.18],
[35.20]
- Dereference operator: operator* ...
[8.8],
[13.9],
[13.13],
[16.22],
[16.25]
- Dereference operator: operator-> ...
[8.8],
[16.22],
[16.25]
- Derived class' assignment operator (see also Operator overloading) ...
[12.4]
- Derived classes ...
[19.3]
- Assignment operators ...
[12.4]
- Can access protected parts of Base ...
[19.7]
- Can't access private parts of Base ...
[19.6]
- Derived* → Base* conversion ...
[19.4],
[21.2]
- Derived* → private Base* conversion (invalid) ...
[24.4]
- Derived** → Base** conversion (invalid) ...
[21.2]
- Derived** → Base**, Casting, evilness of ...
[21.2]
- Design books ...
[28.8]
- Design patterns
- Design: Decision process must include business criteria ...
[6.17]
- Destructors (see also under Exceptions) ...
[11.13],
[17.9]
- Destructors ...
[11],
[16.9],
[16.14],
[38.7],
[38.8]
- Base class subobjects are automagically destructed ...
[11.12]
- Calling a virtual from ...
[23.5],
[23.7]
- Can't be overloaded ...
[11.4]
- Coding standards concerning ...
[27.10]
- Controlling lifetimes of locals ...
[11.6],
[11.7],
[11.8]
- Explicitly calling them (don't!) ...
[11.5],
[11.6],
[11.9]
- Explicitly calling them (sometimes okay) ...
[11.10]
- Last rites ...
[11.1]
- Member objects are automagically destructed ...
[11.11]
- Order of destruction for array elements ...
[11.3]
- Order of destruction for locals ...
[11.2]
- Order with inheritance ...
[25.15]
- Throwing an exception from (beware!) ...
[11.13],
[17.9]
- virtual ...
[11.12],
[16.24],
[20.8],
[21.2],
[33.13]
- virtual destructor coding standard ...
[20.7]
- Determining if inheritance is proper ...
[21.12]
- Development of software is decision-making ...
[6.16],
[9.3],
[17.8],
[19.8],
[19.9],
[21.8],
[23.4],
[25.2],
[25.3],
[25.5],
[25.6],
[29.7],
[29.11],
[36.2],
[36.3],
[36.5],
[36.6]
- Diamond, dreaded ...
[25.8]
- Dictionary of Algorithms and Data Structures ...
[29.2]
- Difference between .* and ->* pointers ...
[33.9]
- Digital Mars free C++ compiler ...
[38.1]
- Dijkstra ...
[5.3]
- Directive: using-directive ...
[27.5]
- Directory separator: use "/", not "\" ...
[15.16],
[39.7]
- DIRR (Destruction Is Resource Reclamation) (see also under Exceptions) ...
[6.18]
- Disaster of double-delete ...
[16.2]
- Discipline and rigor: exception handling requires ...
[17.5]
- Disciplines ...
[27]
- Assignment operators check assignment-to-self ...
[12.1],
[27.10]
- Assignment operators return *this ...
[27.10]
- Assignment operators use const ...
[27.10]
- Avoid arrays ...
[16.17],
[17.11],
[21.5],
[34.1]
- Avoid bizarre syntax ...
[27.14]
- Avoid casting Derived** → Base** ...
[21.2]
- Avoid casting Foo** → Foo const** ...
[18.17]
- Avoid casting pointers ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- Avoid char* (use a string-like class instead) ...
[13.6],
[17.11]
- Avoid converting array-of-Derived → kind-of Array-of-Base ...
[21.4]
- Avoid Derived** → Base**, Casting ...
[21.2]
- Avoid dynamically typed libraries ...
[37.5]
- Avoid explicitly calling destructors (sometimes okay) ...
[11.10]
- Avoid explicitly calling destructors on local objects ...
[11.5],
[11.6]
- Avoid Foo** → Foo const**, Casting ...
[18.17]
- Avoid hiding inherited public features ...
[21.1],
[21.6],
[21.7],
[21.8],
[21.9],
[23.9]
- Avoid hiding nested identifiers ...
[39.8]
- Avoid macros ...
[9.5],
[29.11],
[30.3],
[39.4],
[39.5],
[39.6]
- Avoid missing virtual on some base class dtors ...
[20.7]
- Avoid mixing malloc() and delete ...
[16.3]
- Avoid mixing new and free() ...
[16.3]
- Avoid mixing new T[n] with delete p ...
[16.12],
[16.13],
[26.11]
- Avoid mixing realloc() and new ...
[16.5]
- Avoid overabundance of try/catch blocks ...
[17.7]
- Avoid passing array-of-Derived as array-of-Base ...
[21.4],
[21.5]
- Avoid pointer casts ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- Avoid preprocessor ...
[29.8]
- Avoid unnecessary global variables ...
[33.2],
[39.8]
- Avoid unnecessary use of "dumb" pointers ...
[34.6]
- Avoid zombie objects ...
[17.8]
- Bloodshed, Jihads, and Heat vs. Light ...
[27.1]
- Coding standards are never sufficient ...
[27.2]
- Coding standards are sometimes necessary ...
[27.2]
- const_cast ...
[18.13]
- Constructors should throw exceptions on failure ...
[17.8]
- Copy constructors use const ...
[27.10]
- Declare near first use ...
[27.7]
- Design classes from the outside-in ...
[13.13]
- Don't base C++ standards on C standards ...
[27.3],
[34.1]
- Don't test for NULL after new ...
[16.6]
- Don't test for NULL before delete ...
[16.8]
- Explicitly calling destructors (don't!) ...
[11.9]
- Header filename extensions ...
[27.9]
- Identifier naming conventions ...
[27.12]
- Initialization lists ...
[10.6],
[26.8],
[27.10]
- Law of the Big Three ...
[16.17],
[27.10]
- Macros that contain if ...
[39.4]
- Macros that contain multiple lines ...
[39.5]
- Macros that perform token pasting ...
[39.6]
- main() returns int, not void ...
[5.8],
[29.3]
- Multiple inheritance ...
[25.4]
- Never throw exceptions from a dtor ...
[17.9]
- Operator overloading ...
[27.10]
- Prefer ++i over i++ ...
[13.15]
- Source filename extensions ...
[27.8]
- static at file-scope (don't!) ...
[7.5]
- The Ellemtel coding guidelines ...
[27.13]
- Todd Hoff's coding guidelines ...
[27.13]
- Use a std::string object rather than a char* ...
[13.6],
[17.11]
- Use delete[] for arrays ...
[16.12]
- Use of the ternary ?: operator ...
[27.6]
- virtual destructors ...
[20.7],
[27.10]
- Whitespace pseudo-standards ...
[29.10]
- DJGPP free C++ compiler ...
[38.1]
- Doc++ ...
[40.1]
- doc++: a javadoc-like tool ...
[40.1]
- Doctrine of Least Surprise (see also Operator overloading) ...
[13.9]
- Documentation generated by tools, HTML ...
[40.1]
- Does help the users of a class (see also Operator overloading) ...
[13.2]
- Does not help the developer of a class (see also Operator overloading) ...
[13.4]
- Dominate: Business criteria dominate technical criteria ...
[6.5]
- Donald E. Knuth ...
[29.17],
[37.7]
- DOS
- Binary mode for opening streams ...
[15.12]
- Binary mode for std::cin and std::cout ...
[15.13]
- Newsgroups specializing in ...
[5.9]
- OS-specific questions/answers ...
[40.5]
- Double-delete-disaster ...
[16.2]
- Double-precision arithmetic ...
[29.17],
[29.18]
- Downloading
- CHM version of this document ...
[2.1]
- HTML version of this document ...
[2.1]
- Downloads, free
- Bjarne Stroustrup's web site ...
[29.4]
- Borland free C++ compiler ...
[38.1]
- British Informatics Olympiad ...
[29.2]
- C++ Libraries FAQ ...
[37.9]
- Ccdoc ...
[40.1]
- Cfront C++ compiler ...
[38.13]
- Cygwin ...
[38.5]
- Dictionary of Algorithms and Data Structures ...
[29.2]
- Digital Mars free C++ compiler ...
[38.1]
- DJGPP free C++ compiler ...
[38.1]
- Doc++ ...
[40.1]
- Doxygen ...
[40.1]
- Garbage collectors ...
[16.27],
[16.28]
- Grammar for C++ ...
[38.11]
- Industrial Strength C++ ...
[27.13]
- International Obfuscated C Coding Contest ...
[27.14]
- Lgrind ...
[40.3]
- LLVM C++ compiler ...
[38.13]
- Microsoft C++ freely downloadable command-line compiler ...
[38.1]
- MinGW ...
[38.5]
- MinGW free C++ compiler ...
[38.1]
- On floating point arithmetic ...
[29.17]
- PERCEPS ...
[40.1]
- STL Error-Message filter ...
[35.17]
- Techi-Warehouse ...
[5.9]
- The Correct C++ Tutorial ...
[29.21]
- University of Valladolid Programming Contest Site ...
[29.2]
- Doxygen ...
[40.1]
- doxygen: a javadoc-like tool ...
[40.1]
- Dreaded diamond ...
[25.8]
- Dtor (see also Destructors) ...
[11]
- Dubious programming practices ...
[6.15]
- Arrays ...
[16.17],
[17.11],
[21.5],
[34.1]
- Casting Derived** → Base** ...
[21.2]
- Casting Foo** → Foo const** ...
[18.17]
- Casting pointers ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- char* (use a string-like class instead) ...
[13.6],
[17.11]
- Converting array-of-Derived → kind-of Array-of-Base ...
[21.4]
- Derived** → Base**, Casting ...
[21.2]
- Explicitly calling destructors (sometimes okay) ...
[11.10]
- Explicitly calling destructors on local objects ...
[11.5],
[11.6]
- Foo** → Foo const**, Casting ...
[18.17]
- Hiding inherited public features ...
[21.1],
[21.6],
[21.7],
[21.8],
[21.9],
[23.9]
- Macros ...
[9.5],
[29.11],
[30.3],
[39.4],
[39.5],
[39.6]
- Missing virtual on some base class dtors ...
[20.7]
- Mixing malloc() and delete ...
[16.3]
- Mixing new and free() ...
[16.3]
- Mixing new T[n] with delete p ...
[16.12],
[16.13],
[26.11]
- Mixing realloc() and new ...
[16.5]
- Passing array-of-Derived as array-of-Base ...
[21.4],
[21.5]
- Pointer casts ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- Preprocessor ...
[29.8]
- Unnecessary global variables ...
[33.2],
[39.8]
- Unnecessary use of "dumb" pointers ...
[34.6]
- Duplication of code, Avoiding ...
[35.9]
- Dust ...
[10.1]
- Dynamic
- Dynamic Binding During Initialization Idiom ...
[23.6]
|