Thursday, 3 April 2014

What is rule of three in c++?

Rule of three says, if you happen to write either one of the following , then you better write all of them

1.Destructor
2.Copy Constructor
3.Assignment Operator


The reason is, if you write any of the above, then it is assumed that you want to perform something which is not achieved by the default versions provided by the compiler.

No comments:

Post a Comment

AWS Data Pipeline Services

https://www.youtube.com/watch?v=tykcCf-Zz1M