What is the copy-and-swap idiom?
What is this idiom and when should it be used? Which problems does it solve? Does the idiom change when C++11 is used? … Read more
What is this idiom and when should it be used? Which problems does it solve? Does the idiom change when C++11 is used? … Read more
Note: The answers were given in a specific order, but since many users sort answers according to votes, rather than the time they … Read more
What does copying an object mean? What are the copy constructor and the copy assignment operator? When do I need to declare them … Read more
What are the proper uses of: static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value) How does one decide which to use … Read more
I’ve been told by others that writing using namespace std; in code is wrong, and that I should use std::cout and std::cin directly … Read more
What does the explicit keyword mean in C++? 10 The compiler is allowed to make one implicit conversion to resolve the parameters to … Read more
I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable … Read more
This question’s answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. … Read more