C++ FAQ
/ Topics beginning with 'C'
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 'C'
[ 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
]
- C language
- C++ books ...
[28]
- C++ compiler
- C++ compilers
- Free: Borland free C++ compiler ...
[38.1]
- Free: Digital Mars free C++ compiler ...
[38.1]
- Free: DJGPP free C++ compiler ...
[38.1]
- Free: Microsoft C++ freely downloadable command-line compiler ...
[38.1]
- Free: MinGW free C++ compiler ...
[38.1]
- C++ FAQ ...
[3]
- Author ...
[1.1]
- Availability on-line ...
[2]
- Belorussian translation ...
[2.3]
- Book covers different topics ...
[3.2]
- Bosnian translation ...
[2.4]
- Bulgarian translation ...
[2.5]
- Chinese (Mainland/GB encoding) translation ...
[2.6]
- Chinese (Taiwan/Big5 encoding) translation ...
[2.6]
- Copy permissions ...
[1]
- Copying permissions ...
[1.3]
- Copyright notice ...
[1.2]
- Croatian translation ...
[2.4]
- French translation ...
[2.7]
- German translation ...
[2.8]
- Greek translation ...
[2.9]
- How you can help ...
[6.19]
- Korean translation ...
[2.10]
- Minsk translation ...
[2.3]
- Mirror WWW sites ...
[2.1]
- No Warranty ...
[1.4]
- Not same as C++ FAQ Book ...
[1.6],
[3.2]
- Polish translation ...
[2.11]
- Portuguese translation ...
[2.12]
- Recent changes ...
[4]
- Romanian translation ...
[2.13]
- Russian translation ...
[2.14]
- Serbian translation ...
[2.4]
- Spanish translation ...
[2.15]
- Turkish translation ...
[2.16]
- C++ FAQ Book ...
[3]
- Covers different topics from this on-line document ...
[3.2]
- ISBN ...
[3.1]
- Not same as the on-line document ...
[3.2]
- URL for Amazon.com ...
[3.1]
- C++ Keywords
- catch ...
[17.1]
- class ...
[7.1],
[7.9]
- const ...
[13.9],
[18.1]
- const_cast ...
[18.13]
- delete ...
[13.10],
[16.9],
[16.11],
[16.12],
[16.14],
[16.15],
[38.7]
- explicit ...
[10.22],
[13.9],
[20.7]
- export ...
[35.14],
[35.15]
- extern ...
[32],
[32.3]
- for ...
[39.8]
- if ...
[17.1]
- inline ...
[9.1],
[9.6],
[9.7],
[9.9],
[39.13]
- mutable ...
[18.13]
- new ...
[16.1],
[16.4],
[16.5],
[16.11]
- operator ...
[13.4]
- private ...
[7.4],
[7.6],
[24]
- protected ...
[7.4],
[24]
- public ...
[7.9]
- sizeof ...
[26.1],
[26.2],
[26.5],
[26.6]
- struct ...
[7.1],
[7.9]
- template ...
[35.14]
- this ...
[10.7]
- throw ...
[17.1],
[17.15]
- try ...
[17.1]
- typeid ...
[34.4]
- typename ...
[16.18],
[16.19],
[35.2],
[35.3],
[35.4],
[35.12],
[35.13]
- using ...
[23.9],
[27.5]
- virtual ...
[16.24],
[17.16],
[20.7],
[25.9]
- C++ Libraries FAQ ...
[37.9]
- C++ to C conversion ...
[38.13]
- C++11 ...
[6.12]
- C++2LaTeX (see Pretty printing) ...
[40.3]
- C-Clearly (see Pretty printing) ...
[40.3]
- Cache Misses
- Calling base-class member functions using :: ...
[20.5]
- Calling member functions defined in my base class ...
[20.5]
- Calling Virtuals During Initialization Idiom ...
[23.6]
- Can randomly expose errors; Multi-threading and ...
[16.2]
- Can't invent new operators (see also Operator overloading) ...
[13.7]
- Can't replace behavior on built-in operators (see also Operator overloading) ...
[13.6],
[26.10]
- Car and Truck example ...
[20.6]
- Car: Parking lot of Car vs. of Vehicle ...
[21.3]
- Casting Derived** → Base**, evilness of ...
[21.2]
- Casting Foo** → Foo const**, evilness of ...
[18.17]
- Casting pointers, evilness of ...
[16.25],
[18.17],
[21.2],
[23.12],
[27.11],
[30.2],
[30.3],
[37.5]
- catch ...
[17]
- Avoid catch-by-pointer (usually) ...
[17.13],
[17.14]
- Avoid catch-by-value ...
[17.13]
- Avoiding an overabundance of try/catch blocks ...
[17.7]
- Broken mindset ...
[17.6],
[17.7]
- Catch-by-pointer, avoid (usually) ...
[17.13],
[17.14]
- Catch-by-value, avoid ...
[17.13]
- Compared to return-codes and if ...
[17.1],
[17.2]
- Constructors can throw exceptions ...
[17.8]
- Copy ctor must be publicly accessible ...
[17.17]
- Destructors ...
[11.13],
[17.9]
- DIRR (Destruction Is Resource Reclamation) ...
[6.18]
- Eliminate some if statements ...
[17.1]
- Example of throw; to re-throw current exception ...
[16.10],
[17.11],
[38.7],
[38.8]
- Example of try ... catch ...
[16.10],
[17.11],
[38.7],
[38.8]
- Free lunch...NOT! ...
[17.5]
- Inherit your own exception classes (ultimately) from std::exception ...
[17.12]
- Member objects should be self-managing ...
[17.10]
- Mindset, right and wrong ...
[17.6],
[17.7]
- Not one-size-fits-all ...
[17.5]
- Number of copies made internally ...
[17.17]
- Panacea...NOT! ...
[17.5]
- Polymorphically throwing ...
[17.16]
- Publicly accessible copy constructor ...
[17.17]
- RAII (Resource Acquisition Is Initialization) ...
[6.18],
[17.6],
[17.7]
- Requires discipline and rigor ...
[17.5]
- RRID (Resource Reclamation Is Destruction) ...
[6.18]
- Separate the "good (happy) path" from the "bad path" ...
[17.4]
- Simplify function return types and parameter types ...
[17.3]
- Simplify propagating the error information up the stack ...
[17.2]
- Stack unwinding ...
[11.13],
[17.9]
- std::bad_alloc ...
[16.6],
[16.7]
- std::runtime_error ...
[17.12]
- throw ...
[16.6],
[16.7]
- throw; (without an exception-object after the throw keyword) ...
[17.15]
- Throwing polymorphically ...
[17.16]
- What to catch ...
[17.13]
- What to throw ...
[17.12]
- Whipping boy for the weak ...
[17.5]
- Wrong mindset ...
[17.6],
[17.7]
- catch keyword ...
[17.1]
- Catch-by-pointer, avoid (usually) (see also under Exceptions) ...
[17.13],
[17.14]
- Catch-by-value, avoid (see also under Exceptions) ...
[17.13]
- Caveats, Serialization and ...
[36.12]
- Ccdoc ...
[40.1]
- ccdoc: a javadoc-like tool ...
[40.1]
- Cfront C++ compiler ...
[38.13]
- Chaining method calls ...
[8.4],
[10.20]
- Changes to this document ...
[4]
- Changing the screen's colors ...
[15.21]
- char* (use a string-like class instead), evilness of ...
[13.6],
[17.11]
- char: Defined ...
[26.3],
[26.4]
- char: Not necessarily the same as "character" ...
[26.3]
- char: sizeof(char) is 1 ...
[26.1]
- Character not necessarily the same as char ...
[26.3],
[26.4]
- Chinese (Mainland/GB encoding) translation of this document ...
[2.6]
- Chinese (Taiwan/Big5 encoding) translation of this document ...
[2.6]
- CHM version of this document ...
[2.1]
- Choosing between integer sizes ...
[29.5]
- Choosing member-functions vs. friend-functions ...
[14.5]
- Choosing the best Serialization technique ...
[36.2]
- Chopped copies ...
[17.13],
[17.16],
[20.8],
[22.5],
[31.8],
[34.4]
- Circles vs. Ellipses ...
[21.6],
[21.7],
[21.8],
[21.9],
[21.10],
[21.11]
- Circular dependencies ...
[39.11]
- class keyword ...
[7.1],
[7.9]
- Class template is a family of classes (see also under Templates) ...
[35.2],
[35.12]
- Class templates ...
[35.2],
[35.12],
[35.15]
- clear() and std::istream (input/output) ...
[15.3]
- Clearing the screen ...
[15.20]
- Cline, Marshall ...
[1.1]
- clone() methods ...
[16.24],
[20.8],
[22.5]
- clrscr() ...
[15.20]
- Code beautifier
- Code bloat ...
[9.3]
- Code duplication, Avoiding ...
[35.9]
- Coding standards (see also Operator overloading) ...
[27.10]
- Coding standards ...
[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]
- Coding standards concerning (Const correctness) ...
[27.10]
- Coding-Standard books on C++ ...
[27.1],
[27.13]
- Colors: changing the screen's ...
[15.21]
- Column-major order ...
[13.11],
[13.12]
- Combinations ...
[5.3]
- Comma operator (see also Operator overloading) ...
[13.9]
- Committee Draft (CD) for ANSI/ISO C++ ...
[6.13]
- comp.lang.c++
- Acronyms ...
[5.1]
- Don't answer FAQs ...
[5.6]
- Don't post job ads ...
[5.10]
- Don't post resumés ...
[5.11]
- FAQs for other newgroups ...
[5.14]
- How to handle off-topic postings ...
[5.12]
- How to post code ...
[5.8]
- Netiquette ...
[5.4]
- Not for homework problems ...
[5.2]
- Spam ...
[5.13]
- Subject: lines ...
[5.7]
- What if others ask FAQs ...
[5.5]
- What if others ask homework problems ...
[5.3]
- Which newsgroup to use ...
[5.9]
- Compared to return-codes and if (see also under Exceptions) ...
[17.1],
[17.2]
- Comparisons, floating point ...
[29.17],
[29.18]
- Compatibility, Binary ...
[38.9]
- Compilation model, separate ...
[35.12],
[35.13],
[35.14],
[35.15]
- Compile-time (see also under Templates) ...
[35.10]
- Compiler dependencies ...
[38],
[38.5]
- Compiler option -D ...
[35.14]
- Compilers for C++ ...
[38.5],
[38.11],
[38.13]
- Free: Borland free C++ compiler ...
[38.1]
- Free: Digital Mars free C++ compiler ...
[38.1]
- Free: DJGPP free C++ compiler ...
[38.1]
- Free: Microsoft C++ freely downloadable command-line compiler ...
[38.1]
- Free: MinGW free C++ compiler ...
[38.1]
- Composition
- Benefits compared to freestore ...
[31.4],
[31.5]
- Compared with private inheritance ...
[24.2]
- Criteria for composition vs. private inheritance ...
[24.3]
- Inlining virtual functions ...
[31.5],
[31.6]
- Concrete (Bitwise) state vs. Abstract (Meaningwise) state ...
[18.10],
[18.11]
- Conflicts; Reader/writer and writer/writer conflicts ...
[36.12]
- Confusion increases cost ...
[23.4]
- Conservative garbage collectors ...
[16.27]
- Consistency is good, but not the greatest good ...
[23.3]
- Const correctness ...
[18],
[18.1]
- A form of type safety ...
[18.2]
- Aliasing of const and non-const pointers ...
[18.15]
- Basics ...
[29.6]
- Coding standards concerning ...
[27.10]
- const member functions ...
[18.10]
- const X& x vs. X const& x ...
[18.8]
- const X* x vs. X const* x ...
[18.9]
- const-overloading ...
[18.12]
- const-reference returned from const member functions ...
[18.11]
- const_cast ...
[18.13],
[18.14]
- Converting Foo** → Foo const**, evilness of ...
[18.17]
- Fred& const x is nonsense ...
[18.7]
- Immutable (const) pointers ...
[18.5]
- mutable ...
[18.13]
- Pointer to const member function ...
[33.8]
- Pointer-to-const ...
[18.4],
[18.5],
[26.13]
- Pointer-to-const aliasing ...
[18.16]
- Prefer const vs. #define ...
[29.7]
- Reference-to-const ...
[18.6],
[26.13]
- Retrofitting const correctness is hard ...
[18.3]
- X const& x vs. const X& x ...
[18.8]
- X const* x vs. const X* x ...
[18.9]
- const keyword ...
[13.9],
[18.1]
- const member functions (Const correctness) ...
[18.10]
- const pointers ...
[18.4],
[18.5],
[18.16]
- const references ...
[18.1],
[18.6]
- const X& x vs. X const& x (Const correctness) ...
[18.8]
- const X* x vs. X const* x (Const correctness) ...
[18.9]
- const-overloading (Const correctness) ...
[18.12]
- const-overloading of the subscript operator, operator[] ...
[13.9],
[18.12]
- const-reference returned from const member functions (Const correctness) ...
[18.11]
- const_cast (Const correctness) ...
[18.13],
[18.14]
- const_cast keyword ...
[18.13]
- Construct On First Use Idiom ...
[10.15],
[10.16],
[10.17],
[10.18],
[26.9]
- Constructive operators should return by value (see also Operator overloading) ...
[13.9]
- Constructive operators shouldn't change their operands (see also Operator overloading) ...
[13.9]
- Constructors ...
[10],
[16.10]
- Build objects from dust ...
[10.1]
- Calling a virtual from ...
[10.7],
[23.5]
- Calling a virtual from; idiom ...
[23.6]
- Calling another constructor ...
[10.3]
- Coding standards re. copy constructor ...
[27.10]
- Copy, Should use const ...
[27.10]
- Default constructors ...
[10.4],
[10.5]
- Init methods ...
[10.3]
- Initialization lists, Coding standard ...
[10.6],
[26.8],
[27.10]
- Initialization lists, Using this within ...
[10.7]
- Initialization of static data ...
[10.14],
[10.15],
[10.17]
- Member objects should be self-managing ...
[17.10]
- Named Constructor Idiom ...
[10.8],
[16.21],
[16.24]
- Order with inheritance ...
[25.14]
- Throwing exceptions ...
[17.8]
- Virtual Constructor Idiom ...
[16.24],
[17.16],
[20.8],
[22.5]
- Constructors can throw exceptions (see also under Exceptions) ...
[17.8]
- Containers ...
[34]
- Contiguous storage in std::vector<T> ...
[34.3]
- Contracts on methods ...
[21.11],
[21.12]
- Conversions, invalid
- array-of-Derived → array-of-Base ...
[21.4]
- Conversions, invalid: Derived** → Base** pointers ...
[21.2]
- Conversions, invalid: Foo** → Foo const** pointers ...
[18.17]
- Convert from string ...
[39.2],
[39.3]
- Convert to string; stringify() ...
[35.8],
[39.1],
[39.3]
- Converting array-of-Derived → kind-of Array-of-Base, evilness of ...
[21.4]
- Converting C++ to C ...
[38.13]
- Converting char-pointers to numbers ...
[15.22]
- Converting chars to numbers ...
[15.22]
- Converting Foo** → Foo const**, evilness of (Const correctness) ...
[18.17]
- Copy constructors
- Copy ctor must be publicly accessible (see also under Exceptions) ...
[17.17]
- Copy on write (see Reference counting) ...
[16.23],
[16.24]
- Copy on write in reference counting ...
[16.23],
[16.24]
- Copy semantics ...
[31.1]
- Copying permissions ...
[1],
[1.3]
- Copyright notice ...
[1.2]
- Corruption of heap: bang, you're dead ...
[16.12],
[30.3],
[38.7],
[38.8]
- Cost, schedule, risk ...
[23.3]
- count ...
[27.5]
- cout ...
[27.5]
- Covariant Return Types ...
[20.8]
- Crash at runtime without any warning ...
[11.5],
[11.6],
[16.2],
[16.3],
[16.5],
[16.12],
[16.13],
[17.11],
[20.7],
[21.1],
[21.4],
[21.5],
[26.11],
[34.1],
[39.8]
- create() methods (see Named Constructor Idiom) ...
[10.8],
[16.21],
[16.24]
- Creational pattern ...
[36.8]
- Croatian translation of this document ...
[2.4]
- Cross delegation with virtual inheritance ...
[25.10]
- cstdio header ...
[15.1]
- Ctor (see also Constructors) ...
[10]
- Curley-braces: whitespace standards ...
[29.10]
- Cursors: moving them on the screen ...
[15.19]
- Cycles within graphs (definition), Serialization and ...
[36.13]
- Cygwin ...
[38.5]
|