I wanted to know Why compiler provides default copy constructor..Whats the strategy behind that idea.
Thanks in Advance.
I don't know why it was originally designed that way. But as a user I can say why I'm glad they did.
I feel the same way about the default assignment operator. Most people either a) define their copy constructor / equals operator incorrectly or fail to maintain it. I've removed a lot of bugs in C++ code by switching to RAII types and deleting hand coded operators / copy constructors.