음악, 삶, 개발

C++ FAQ 목차 본문

개발 공부/C++ FAQ

C++ FAQ 목차

Lee_____ 2020. 9. 16. 06:57

원문 : https://isocpp.org/wiki/faq

 

What is C++?
Is C++ a practical language?
Is C++ a perfect language?
What is the zero-overhead principle?
What’s so great about classes?
What’s the big deal with OO?
What’s the big deal with generic programming?
What is multiparadigm programming?
Is C++ better than Java? (or C#, C, Objective-C, JavaScript, Ruby, Perl, PHP, Haskell, FORTRAN, Pascal, Ada, Smalltalk, or any other language?)
Why is C++ so big?
Who uses C++?
How long does it take to learn C++?
What’s the best way to improve my C++ programs?
Does it matter which programming language I use?
What are some features of C++ from a business perspective?
Are virtual functions (dynamic binding) central to OO/C++?
I’m from Missouri. Can you give me a simple reason why virtual functions (dynamic binding, dynamic polymorphism) and templates (static polymorphism) make a big difference?
Is C++ backward compatible with ANSI/ISO C?
Why is C++ (almost) compatible with C?
When was C++ invented?
Why was C++ invented?
Where did the name C++ come from?
Why does C++ allow unsafe code?
Why are some things left undefined in C++?
Why is portability considered so important?
Is C++ standardized?
Who is on the standardization committee?
Where can I get a copy of the C++ standard?
What is the difference between C++98 and C++03?
What is the difference between C++98 and C++0x?
What is the difference between C++98 and C++11?
What is the difference between C++11 and C++14?
What are some “interview questions” I could ask that would let me know if candidates really know their stuff?
What does the FAQ mean by “such and such is evil”?
Will I sometimes use any so-called “evil” constructs?
Is it important to know the technical definition of “good OO”? Of “good class design”?
What should I tell people who complain that the word “FAQ” is misleading, that it emphasizes the questions rather than the answers, and that we should all start using a different acronym?
How can I help make the C++ FAQ even better??!??
What is this “newbie section” all about?
Where do I start? Why do I feel so confused, so stupid?
How do I read a string from input?
How do I write this very simple program?
How do I convert an integer to a string?
How do I convert a string to an integer?
Should I use void main() or int main()?
Should I use f(void) or f()?
What are the criteria for choosing between short / int / long data types?
What the heck is a const variable? Isn’t that a contradiction in terms?
Why would I use a const variable / const identifier as opposed to #define?
Are you saying that the preprocessor is evil?
What is the “standard library”? What is included / excluded from it?
How should I lay out my code? When should I use spaces, tabs, and/or newlines in my code?
Is it okay if a lot of numbers appear in my code?
What’s the point of the L, U and f suffixes on numeric literals?
I can understand the and (&&) and or (||) operators, but what’s the purpose of the not (!) operator?
Is !(a < b) logically the same as a >= b?
What is this NaN thing?
Why is floating point so inaccurate? Why doesn’t this print 0.43?
Why doesn’t my floating-point comparison work?
Why is cos(x) != cos(y) even though x == y? (Or sine or tangent or log or just about any other floating point computation)
What is the type of an enumeration such as enum Color? Is it of type int?
If an enumeration type is distinct from any other type, what good is it? What can you do with it?
What other “newbie” guides are there for me?
What is mentoring?
Should I learn C before I learn C++?
Should I learn Objective-C or another OO language before I learn C++?
How do I start learning C++?
What is the best book to learn C++ from?
Should I buy one book, or several?
What are some best-of-breed C++ morality guides?
What are some best-of-breed C++ legality guides?
What are some best-of-breed C++ programming-by-example guides?
Are there other books that are relevant to C++?
Will someone here help me with my homework?
Where can I get a free C++ compiler?
What are some good C++ coding standards?
Are coding standards necessary? Are they sufficient?
Should our organization determine coding standards from our C experience?
What’s the difference between and headers?
Should I use using namespace std in my code?
Is the ?: operator evil since it can be used to create unreadable code?
Should I declare locals in the middle of a function or at the top?
What source-file-name convention is best? foo.cpp? foo.C? foo.cc?
What header-file-name convention is best? foo.H? foo.hh? foo.hpp?
Are there any lint-like guidelines for C++?
Why do people worry so much about pointer casts and/or reference casts?
Which is better: identifier names that_look_like_this or identifier names thatLookLikeThis?
Are there any other sources of coding standards?
Should I use “unusual” syntax?
What’s a good coding standard for using global variables?
What’s the difference between C++ and Objective-C?
What is “static typing,” and how is it similar/dissimilar to Objective-C?
Which is a better fit for C++: “static typing” or “dynamic typing”?
How do you use inheritance in C++, and is that different from Objective-C?
What are the practical consequences of differences in Objective-C/C++ inheritance?
Note: This section needs more material
What’s the difference between C++ and C#/Java?
Why doesn’t C++ have a universal class Object?
Is “generics” what templates should have been?
Is it easy to migrate from C to C++?
What’s the difference between C++ and C?
Is C a subset of C++?
Why use sort() when we have good old qsort()?
Why must I use a cast to convert from void*?
What do I need to know when mixing C and C++ code?
How do I call a C function from C++?
How do I call a C++ function from C?
How can I include a standard C header file in my C++ code?
How can I include a non-system C header file in my C++ code?
How can I modify my own C header files so it’s easier to #include them in C++ code?
How can I call a non-system C function f(int,char,float) from my C++ code?
How can I create a C++ function f(int,char,float) that is callable by my C code?
Why is the linker giving errors for C/C++ functions being called from C++/C functions?
How can I pass an object of a C++ class to/from a C function?
Can my C function directly access data in an object of a C++ class?
Why do I feel like I’m “further from the machine” in C++ as opposed to C?
Can sizeof(char) be 2 on some machines? For example, what about double-byte characters?
What are the units of sizeof?
Whoa, but what about machines or compilers that support multibyte characters. Are you saying that a “character” and a char might be different?!?
But, but, but what about machines where a char has more than 8 bits? Surely you’re not saying a C++ byte might have more than 8 bits, are you?!?
Okay, I could imagine a machine with 9-bit bytes. But surely not 16-bit bytes or 32-bit bytes, right?
I’m sooooo confused. Would you please go over the rules about bytes, chars, and characters one more time?
What is a “POD type”?
When initializing non-static data members of built-in / intrinsic / primitive types, should I use the “initialization list” or assignment?
When initializing static data members of built-in / intrinsic / primitive types, should I worry about the “static initialization order fiasco”?
Can I define an operator overload that works with built-in / intrinsic / primitive types?
When I delete an array of some built-in / intrinsic / primitive type, why can’t I just say delete a instead of delete[] a?
How can I tell if an integer is a power of two without looping?
What should be returned from a function?
Why should I use instead of the traditional ?
Why does my program go into an infinite loop when someone enters an invalid input character?
How can I get std::cin to skip invalid input characters?
How does that funky while (std::cin >> foo) syntax work?
Why does my input seem to process past the end of file?
Why is my program ignoring my input request after the first iteration?
Should I end my output lines with std::endl or '\n'?
How can I provide printing for my class Fred?
But shouldn’t I always use a printOn() method rather than a friend function?
How can I provide input for my class Fred?
How can I provide printing for an entire hierarchy of classes?
How can I open a stream in binary mode?
How can I “reopen” std::cin and std::cout in binary mode?
How can I write/read objects of my class to/from a data file?
How can I send objects of my class to another computer (e.g., via a socket, TCP/IP, FTP, email, a wireless link, etc.)?
Why can’t I open a file in a different directory such as "..\test.dat"?
How can I tell (if a key, which key) was pressed before the user presses the ENTER key?
How can I make it so keys pressed by users are not echoed on the screen?
How can I move the cursor around on the screen?
How can I clear the screen? Is there something like clrscr()?
How can I change the colors on the screen?
How can I print a char as a number? How can I print a char* so the output shows the pointer’s numeric value?
What is “const correctness”?
How is “const correctness” related to ordinary type safety?
Should I try to get things const correct “sooner” or “later”?
What does “const X* p” mean?
What’s the difference between “const X* p”, “X* const p” and “const X* const p”?
What does “const X& x” mean?
What do “X const& x” and “X const* p” mean?
Does “X& const x” make any sense?
What is a “const member function”?
What is the relationship between a return-by-reference and a const member function?
What’s the deal with “const-overloading”?
How can it help me design better classes if I distinguish logical state from physical state?
Should the constness of my public member functions be based on what the method does to the object’s logical state, or physical state?
What do I do if I want a const member function to make an “invisible” change to a data member?
Does const_cast mean lost optimization opportunities?
Why does the compiler allow me to change an int after I’ve pointed at it with a const int*?
Does “const Fred* p” mean that *p can’t change?
Why am I getting an error converting a Foo** → const Foo**?
What is a reference?
What happens if you assign to a reference?
What happens if you return a reference?
What does object.method1().method2() mean?
How can you reseat a reference to make it refer to a different object?
Why does C++ have both pointers and references?
When should I use references, and when should I use pointers?
What does it mean that a reference must refer to an object, not a dereferenced null pointer?
What is a handle to an object? Is it a pointer? Is it a reference? Is it a pointer-to-a-pointer? What is it?
Should I use call-by-value or call-by-reference?
Why is this not a reference?
How do I deal with memory leaks?
Can I use new just as in Java?
Should I use NULL or 0 or nullptr?
Does delete p delete the pointer p, or the pointed-to-data *p?
Is it safe to delete the same pointer twice?
Can I free() pointers allocated with new? Can I delete pointers allocated with malloc()?
What is the difference between new and malloc()?
Why should I use new instead of trustworthy old malloc()?
Can I use realloc() on pointers allocated via new?
Why doesn’t C++ have an equivalent to realloc()?
Do I need to check for null after p = new Fred()?
How can I convince my (older) compiler to automatically check new to see if it returns null?
Do I need to check for null before delete p?
What are the two steps that happen when I say delete p?
Why doesn’t delete null out its operand?
Why isn’t the destructor called at the end of scope?
In p = new Fred(), does the Fred memory “leak” if the Fred constructor throws an exception?
How do I allocate / unallocate an array of things?
What if I forget the [] when deleteing an array allocated via new T[n]?
Can I drop the [] when deleteing an array of some built-in type (char, int, etc)?
After p = new Fred[n], how does the compiler know there are n objects to be destructed during delete[] p?
Is it legal (and moral) for a member function to say delete this?
How do I allocate multidimensional arrays using new?
But the previous FAQ’s code is SOOOO tricky and error prone! Isn’t there a simpler way?
But the above Matrix class is specific to Fred! Isn’t there a way to make it generic?
What’s another way to build a Matrix template?
Does C++ have arrays whose length can be specified at run-time?
How can I force objects of my class to always be created via new rather than as local, namespace-scope, global, or static?
How do I do simple reference counting?
How do I provide reference counting with copy-on-write semantics?
How do I provide reference counting with copy-on-write semantics for a hierarchy of classes?
Can I absolutely prevent people from subverting the reference counting mechanism, and if so, should I?
Can I use a garbage collector in C++?
What are the two kinds of garbage collectors for C++?
Where can I get more info on garbage collectors for C++?
What is an auto_ptr and why isn’t there an auto_array?
What is a class?
What is an object?
When is an interface “good”?
What is encapsulation?
How does C++ help with the tradeoff of safety vs. usability?
How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?
Can a method directly access the non-public members of another instance of its class?
Is Encapsulation a Security device?
What’s the difference between the keywords struct and class?
How do I define an in-class constant?
Why do I have to put the data in my class declarations?
How are C++ objects laid out in memory?
Why is the size of an empty class not zero?
What’s the deal with constructors?
Is there any difference between List x; and List x();?
Can one constructor of a class call another constructor of the same class to initialize the this object?
Is the default constructor for Fred always Fred::Fred()?
Which constructor gets called when I create an array of Fred objects?
Should my constructors use “initialization lists” or “assignment”?
How should initializers be ordered in a constructor’s initialization list?
Is it moral for one member object to be initialized using another member object in the initializer expression?
What if one member object has to be initialized using another member object?
Should you use the this pointer in the constructor?
What is the “Named Constructor Idiom”?
Does return-by-value mean extra copies and extra overhead?
What about returning a local variable by value? Does the local exist as a separate object, or does it get optimized away?
Why can’t I initialize my static member data in my constructor’s initialization list?
Why are classes with static data members getting linker errors?
Can I add = initializer; to the declaration of a class-scope static const data member?
What’s the “static initialization order ‘fiasco’ (problem)”?
How do I prevent the “static initialization order problem”?
Why doesn’t the Construct On First Use Idiom use a static object instead of a static pointer?
What is a technique to guarantee both static initialization and static deinitialization?
How do I prevent the “static initialization order problem” for my static data members?
Do I need to worry about the “static initialization order problem” for variables of built-in/intrinsic types?
How can I handle a constructor that fails?
What is the “Named Parameter Idiom”?
Why am I getting an error after declaring a Foo object via Foo x(Bar())?
What is the purpose of the explicit keyword?
Why doesn’t my constructor work right?
What’s the deal with destructors?
What’s the order that local objects are destructed?
What’s the order that objects in an array are destructed?
What’s the order that sub-objects of an object are destructed?
Can I overload the destructor for my class?
Should I explicitly call a destructor on a local variable?
What if I want a local to “die” before the close } of the scope in which it was created? Can I call a destructor on a local if I really want to?
Okay, okay, already; I won’t explicitly call the destructor of a local; but how do I handle the situation from the previous FAQ?
What if I can’t wrap the local in an artificial block?
But can I explicitly call a destructor if I’ve allocated my object with new?
What is “placement new” and why would I use it?
Is there a placement delete?
When I write a destructor, do I need to explicitly call the destructors for my member objects?
When I write a derived class’s destructor, do I need to explicitly call the destructor for my base class?
Should my destructor throw an exception when it detects a problem?
Is there a way to force new to allocate memory from a specific memory area?
What is “self assignment”?
Why should I worry about “self assignment”?
Okay, okay, already; I’ll handle self-assignment. How do I do it?
I’m creating a derived class; should my assignment operators call my base class’s assignment operators?
What’s the deal with operator overloading?
What are the benefits of operator overloading?
What are some examples of operator overloading?
But operator overloading makes my class look ugly; isn’t it supposed to make my code clearer?
What operators can/cannot be overloaded?
Why can’t I overload . (dot), ::, sizeof, etc.?
Can I define my own operators?
Can I overload operator== so it lets me compare two char[] using a string comparison?
Can I create a operator** for “to-the-power-of” operations?
The previous FAQs tell me which operators I can override; but which operators should I override?
What are some guidelines / “rules of thumb” for overloading operators?
How do I create a subscript operator for a Matrix class?
Why shouldn’t my Matrix class’s interface look like an array-of-array?
I still don’t get it. Why shouldn’t my Matrix class’s interface look like an array-of-array?
Should I design my classes from the outside (interfaces first) or from the inside (data first)?
How can I overload the prefix and postfix forms of operators ++ and --?
Which is more efficient: i++ or ++i?
What is a friend?
Do friends violate encapsulation?
What are some advantages/disadvantages of using friend functions?
What does it mean that “friendship isn’t inherited, transitive, or reciprocal”?
Should my class declare a member function or a friend function?
Is inheritance important to C++?
When would I use inheritance?
How do you express inheritance in C++?
Is it okay to convert a pointer from a derived class to its base class?
What’s the difference between public, private, and protected?
Why can’t my derived class access private things from my base class?
How can I protect derived classes from breaking when I change the internal parts of the base class?
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?
Okay, so exactly how should I decide whether to build a “protected interface”?
What is a “virtual member function”?
Why are member functions not virtual by default?
How can C++ achieve dynamic binding yet also static typing?
What is a pure virtual function?
What’s the difference between how virtual and non-virtual member functions are called?
What happens in the hardware when I call a virtual function? How many layers of indirection are there? How much overhead is there?
How can a member function in my derived class call the same function from its base class?
I have a heterogeneous list of objects, and my code needs to do class-specific things to the objects. Seems like this ought to use dynamic binding but can’t figure it out. What should I do?
When should my destructor be virtual?
Why are destructors not virtual by default?
What is a “virtual constructor”?
Why don’t we have virtual constructors?
Should I hide member functions that were public in my base class?
Converting Derived* → Base* works okay; why doesn’t Derived** → Base** work?
Is a parking-lot-of-Car a kind-of parking-lot-of-Vehicle?
Is an array of Derived a kind-of array of Base?
Does array-of-Derived is-not-a-kind-of array-of-Base mean arrays are bad?
Is a Circle a kind-of an Ellipse?
Are there other options to the “Circle is/isnot kind-of Ellipse” dilemma?
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?
Perhaps Ellipse should inherit from Circle then?
But my problem doesn’t have anything to do with circles and ellipses, so what good is that silly example to me?
How could “it depend”??!? Aren’t terms like “Circle” and “Ellipse” defined mathematically?
If SortedList has exactly the same public interface as List, is SortedList a kind-of List?
What’s the big deal of separating interface from implementation?
How do I separate interface from implementation in C++ (like Modula-2)?
What is an ABC?
What is a “pure virtual” member function?
How do you define a copy constructor or assignment operator for a class that contains a pointer to a (abstract) base class?
How can I set up my class so it won’t be inherited from?
How can I set up my member function so it won’t be overridden in a derived class?
Is it okay for a non-virtual function of the base class to call a virtual function?
That last FAQ confuses me. Is it a different strategy from the other ways to use virtual functions? What’s going on?
Should I use protected virtuals instead of public virtuals?
When should someone use private virtuals?
When my base class’s constructor calls a virtual function on its this object, why doesn’t my derived class’s override of that virtual function get invoked?
Okay, but is there a way to simulate that behavior as if dynamic binding worked on the this object within my base class’s constructor?
I’m getting the same thing 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?
Should a derived class redefine (“override”) a member function that is non-virtual in a base class?
What’s the meaning of, Warning: Derived::f(char) hides Base::f(double)?
Why doesn’t overloading work for derived classes?
What does it mean that the “virtual table” is an unresolved external?
How do you express “private inheritance”?
How are “private inheritance” and “composition” similar?
Which should I prefer: composition or private inheritance?
Should I pointer-cast from a private derived class to its base class?
How is protected inheritance related to private inheritance?
What are the access rules with private and protected inheritance?
How is this section organized?
Do we really need multiple inheritance?
I’ve been told that I should never use multiple inheritance. Is that right?
So there are times when multiple inheritance isn’t bad?!??
What are some disciplines for using multiple inheritance?
Can you provide an example that demonstrates the above guidelines?
Is there a simple way to visualize all these tradeoffs?
Can you give another example to illustrate the above disciplines?
What is the “dreaded diamond”?
Where in a hierarchy should I use virtual inheritance?
What does it mean to “delegate to a sister class” via virtual inheritance?
What special considerations do I need to know about when I use virtual inheritance?
What special considerations do I need to know about when I inherit from a class that uses virtual inheritance?
What special considerations do I need to know about when I use a class that uses virtual inheritance?
One more time: what is the exact order of constructors in a multiple and/or virtual inheritance situation?
What is the exact order of destructors in a multiple and/or virtual inheritance situation?
What’s the idea behind templates?
What’s the syntax / semantics for a “class template”?
What’s the syntax / semantics for a “function template”?
How do I explicitly select which version of a function template should get called?
What is a “parameterized type”?
What is “genericity”?
My template function does something special when the template type T is int or std::string; how do I write my template so it uses the special code when T is one of those specific types?
Huh? Can you provide an example of template specialization that doesn’t use foo and bar?
But most of the code in my template function is the same; is there some way to get the benefits of template specialization without duplicating all that source code?
All those templates and template specializations must slow down my program, right?
So templates are overloading, right?
Why can’t I separate the definition of my templates class from its declaration and put it inside a .cpp file?
How can I avoid linker errors with my template functions?
How does the C++ keyword export help with template linker errors?
How can I avoid linker errors with my template classes?
Why do I get linker errors when I use template friends?
Why can’t I define constraints for my template parameters?
How can any human hope to understand these overly verbose template-based error messages?
Why am I getting errors when my template uses a nested type?
Why am I getting errors when my template-derived-class uses a nested type it inherits from its template-base-class?
Why am I getting errors when my template-derived-class uses a member it inherits from its template-base-class?
Can the previous problem hurt me silently? Is it possible that the compiler will silently generate the wrong code?
How can I create a container-template that allows my users to supply the type of the underlying container that actually stores the values?
Follow-up to previous: can I pass in the underlying structure and the element-type separately?
Related: all those proxies must negatively reflect on the speed of my program. Don’t they?
Why should I use container classes rather than simple arrays?
How can I make a perl-like associative array in C++?
Is the storage for a std::vector or a std::array guaranteed to be contiguous?
Why doesn’t C++ provide heterogeneous containers?
How can I build a heterogeneous of objects of different types?
Why can’t I assign a vector to a vector?
How can I insert/access/change elements from a linked list/hashtable/etc?
Can I have a container of smart pointers to my objects?
Why are the standard containers so slow?
What is the “STL”?
Where can I get a copy of “STL”?
How can I find a Fred object in an STL container of Fred* such as std::vector?
Where can I get help on how to use STL?
How can you tell if you have a dynamically typed C++ class library?
What is the NIHCL? Where can I get it?
Where can I ftp the code that accompanies “Numerical Recipes”?
Why is my executable so large?
Where can I get tons and tons of more information on C++ class libraries?
Why use exceptions?
How do I use exceptions?
What shouldn’t I use exceptions for?
What are some ways try / catch / throw can improve software quality?
I’m still not convinced: a 4-line code snippet shows that return-codes aren’t any worse than exceptions; why should I therefore use exceptions on an application that is orders of magnitude larger?
How do exceptions simplify my function return type and parameter types?
What does it mean that exceptions separate the “good path” (or “happy path”) from the “bad path”?
I’m interpreting the previous FAQs as saying exception handling is easy and simple; did I get it right?
Exception handling seems to make my life more difficult; that must mean exception handling itself is bad; clearly I’m not the problem, right??
I have too many try blocks; what can I do about it?
Can I throw an exception from a constructor? From a destructor?
How can I handle a constructor that fails?
How can I handle a destructor that fails?
How should I handle resources if my constructors may throw exceptions?
How do I change the string-length of an array of char to prevent memory leaks even if/when someone throws an exception?
What should I throw?
What should I catch?
But MFC seems to encourage the use of catch-by-pointer; should I do the same?
What does throw; (without an exception object after the throw keyword) mean? Where would I use it?
How do I throw polymorphically?
When I throw this object, how many times will it be copied?
Why doesn’t C++ provide a “finally” construct?
Why can’t I resume after catching an exception?
What is value and/or reference semantics, and which is best in C++?
What is “virtual data,” and how-can / why-would I use it in C++?
What’s the difference between virtual data and dynamic data?
Should I normally use pointers to freestore allocated objects for my data members, or should I use “composition”?
What are relative costs of the 3 performance hits associated with allocating member objects from the freestore?
Are “inline virtual” member functions ever actually “inlined”?
Sounds like I should never use reference semantics, right?
Does the poor performance of reference semantics mean I should pass-by-value?
What’s the deal with inline functions?
What’s a simple example of procedural integration?
Do inline functions improve performance?
How can inline functions help with the tradeoff of safety vs. speed?
Why should I use inline functions instead of plain old #define macros?
How do you tell the compiler to make a non-member function inline?
How do you tell the compiler to make a member function inline?
Is there another way to tell the compiler to make a member function inline?
With inline member functions that are defined outside the class, is it best to put the inline keyword next to the declaration within the class body, next to the definition outside the class body, or both?
Is the type of “pointer-to-member-function” different from “pointer-to-function”?
How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc?
Why do I keep getting compile errors (type mismatch) when I try to use a member function as an interrupt service routine?
Why am I having trouble taking the address of a C++ function?
How can I avoid syntax errors when creating pointers to members?
How can I avoid syntax errors when calling a member function using a pointer-to-member-function?
How do I create and use an array of pointer-to-member-function?
How do I declare a pointer-to-member-function that points to a const member function?
What is the difference between the .* and ->* operators?
Can I convert a pointer-to-member-function to a void*?
Can I convert a pointer-to-function to a void*?
I need something like function-pointers, but with more flexibility and/or thread-safety; is there another way?
What the heck is a functionoid, and why would I use one?
Can you make functionoids faster than normal function calls?
What’s the difference between a functionoid and a functor?
What’s this “serialization” thing all about?
How do I select the best serialization technique?
How do I decide whether to serialize to human-readable (“text”) or non-human-readable (“binary”) format?
How do I serialize/unserialize simple types like numbers, characters, strings, etc.?
How exactly do I read/write simple types in human-readable (“text”) format?
How exactly do I read/write simple types in non-human-readable (“binary”) format?
How do I serialize objects that aren’t part of an inheritance hierarchy and that don’t contain pointers to other objects?
How do I serialize objects that are part of an inheritance hierarchy and that don’t contain pointers to other objects?
How do I serialize objects that contain pointers to other objects, but those pointers form a tree with no cycles and no joins?
How do I serialize objects that contain pointers to other objects, but those pointers form a tree with no cycles and only “trivial” joins?
How do I serialize objects that contain pointers to other objects, and those pointers form a graph that might have cycles or non-trivial joins?
Are there any caveats when serializing / unserializing objects?
What’s all this about graphs, trees, nodes, cycles, joins, and joins at the leaves vs. internal nodes?
C++11: Purpose of this FAQ section
What is C++11?
What is C++0x?
When will compilers implement C++11?
How did the committee approach picking new language and library features for C++11?
What were the general design goals of the C++11 effort?
What specific design goals guided the committee?
Where can I find the committee papers for C++11 features?
Where can I find academic and technical papers about C++11?
Where else can I read about C++11?
Are there any videos about C++11?
Is C++11 hard to learn?
Is C++11 the final C++ standard?
auto
decltype
Range-for statement
Initializer lists
Uniform initialization syntax and semantics
Rvalue references and move semantics
Lambdas
noexcept to prevent exception propagation
constexpr
nullptr – a null pointer literal
Copying and rethrowing exceptions
Inline namespaces
User-defined literals
=default and =delete
Control of default move and copy
Delegating constructors
In-class member initializers
Inherited constructors
Override controls: override
Override controls: final
Explicit conversion operators
enum class
long long – a longer integer
Extended integer types
Generalized unions
Generalized PODs
Extern templates
Template aliases
Variadic templates
Local types as template arguments
Concurrency memory model
Dynamic initialization and destruction with concurrency
Thread-local storage
What is the value of __cplusplus for C++11?
Suffix return type syntax
Preventing narrowing
Right-angle brackets
static_assert compile-time assertions
Raw string literals
Attributes
Alignment
C99 features
unique_ptr
shared_ptr
weak_ptr
Garbage collection ABI
tuple
Type traits
function and bind
Regular Expressions
Time utilities
Random number generation
Scoped allocators
Algorithms improvements
Container improvements
unordered_* containers
std::array
forward_list
Threads
Mutual exclusion
Locks
Condition variables
Atomics
Futures and promises
async
Abandoning a process
C++14: Purpose of this FAQ section
What is C++14?
When will compilers implement C++14?
Where can I find the committee papers for C++14 features?
Where else can I read about C++14?
Are there any videos about C++14?
Is C++14 the final C++ standard?
Binary literals
Generalized return type deduction
decltype(auto)
Generalized lambda captures
Generic lambdas
Variable templates
Extended constexpr
The [ [deprecated] ] attribute
Digit separators
Shared locking
User-defined literals for std:: types
make_unique
Type transformation _t aliases
Where can I download a free C++ compiler?
Where can I get more information on using MFC and Visual C++?
How do I display text in the status bar using MFC?
How can I decompile an executable program back into C++ source code?
Where can I get information about the C++ compiler from {IBM, Microsoft, Sun, etc.}?
What’s the difference between C++ and Visual C++?
How do compilers use “over-allocation” to remember the number of elements in an allocated array?
How do compilers use an “associative array” to remember the number of elements in an allocated array?
If name mangling was standardized, could I link code compiled with compilers from different compiler vendors?
GNU C++ (g++) produces big executables for tiny programs; Why?
Is there a yacc-able C++ grammar?
What is C++ 1.2? 2.0? 2.1? 3.0?
Is it possible to convert C++ to C?
What is a function object?
How do I convert a value (a number, for example) to a std::string?
How do I convert a std::string to a number?
Can I templatize the above functions so they work with other types?
Why do my compiles take so long?
What should be done with macros that contain if?
What should be done with macros that have multiple lines?
What should be done with macros that need to paste two tokens together?
Why can’t the compiler find my header file in #include "c:\test.h" ?
What are the C++ scoping rules for for loops?
Why can’t I overload a function by its return type?
What is “persistence”? What is a “persistent object”?
How can I create two classes that both know about each other?
What special considerations are needed when forward declarations are used with member objects?
What special considerations are needed when forward declarations are used with inline functions?
Why can’t I put a forward-declared class in a std::vector<>?
Why do some people think x = ++y + y++ is bad?
What’s the value of i++ + i++?
What’s the deal with “sequence points”?
How can I generate HTML documentation for my classes? Does C++ have anything similar to javadoc?
Is there a TeX or LaTeX macro that fixes the spacing on “C++”?
Are there any pretty-printers that reformat C++ source code?
Is there a C++-mode for GNU emacs? If so, where can I get it?
Where can I get OS-specific questions answered (e.g., BC++, Windows, etc)?
Why does my DOS C++ program says “Sorry: floating point code not linked”?
Why does my BC++ Windows app crash when I’m not running the BC45 IDE?
Is int* p; right or is int *p; right?
Which layout style is the best for my code?
How do you name variables? Do you recommend Hungarian notation?
Should I put const before or after the type?
What good is static_cast?
So, what’s wrong with using macros?
How do you pronounce cout?
How do you pronounce char?
What happened to C++0x “concepts”?
What were C++0x concepts?
What were C++0x concept maps?
What were C++0x axioms?
Note: This section needs more material
Why doesn’t C++ have modern compilers and tools to support things like refactoring? Why do I have to implement a whole C++ compiler to parse C++ instead of being able to plug into an existing implementation like I can for other languages?
Why does C++ create useless deep copies of objects all over the place, such as returning by value?
What is copy elision? What is RVO?
Matt Austern (Google, Concepts Study Group Chair)
Dean Michael Berris (Google)
Hans Boehm (Hewlett Packard, Concurrency Study Group Chair Emeritus)
Chandler Carruth (Google)
Stephen D. Clamage (Oracle, PL22.16 Chair)
Stefanus Du Toit (WG21 Project Editor Emeritus)
J. Daniel Garcia (Spain)
Peter Gottschling (Germany)
Howard Hinnant (Library Working Group Chair Emeritus)
Kyle Kloepper (Riverbed, WG21 Secretary Emeritus)
Dietmar Kühl (Bloomberg)
Lisa Lippincott (Tanium)
William M. (Mike) Miller (Edison Design Group, Core Working Group Chair)
Clark Nelson (Intel; PL22.16 Vice Chair; Feature Test Study Group Chair)
Eric Niebler
Roger Orr (UK)
P.J. Plauger (Dinkumware, Convener Emeritus)
Nina Dinka Ranns (UK)
Bill Seymour (USPS)
Peter Sommerlad (HSR, Switzerland)
Bjarne Stroustrup (Morgan Stanley, Creator of C++, Evolution Working Group Chair)
Herb Sutter (Microsoft, WG21 Convener)
Andrew Sutton (Concepts TS Project Editor)
Daveed Vandevoorde (Edison Design Group)
JC van Winkel (The Netherlands)
Ville Voutilainen (Finland; Evolution Working Group Chair)
Michael Wong (Codeplay; HoD Canada but also WGE of UK; SG5/SG14 Chair)
Jeffrey Yasskin (Google, Library Evolution Working Group Chair)