I am new to programing and I am in my first programing class. My teacher recently spoke about what he called the big 3. THE BIG 3: overloaded Assignment operator, Destructor, and the Copy Constructor. Can someone explain to me what they are, what they do, and show me an example????
I have looked through the C++ Standard and I have not found out any reference to "THE BIG 3".:) And why "THE BIG 3" and not "THE BIG 4" that includes a constructor at least the default constructor?:)
"The Big Three", or more commonly known as "The Rule of Three", is a programming idiom and not in/directly part of the C++ standard.
The idiom pretty much means this:
If you have to overload either the assignment operator, copy-constructor or destructor, then it's very likely that the remaining two also need overloading. More detail on this subject can be found on StackOverflow[1] and Wikipedia[2].