Please Help

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?:)
Last edited on
@bobr ask your teacher hmmm so simple ;)
closed account (zb0S216C)
"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].

[1]http://stackoverflow.com/a/4172724
[2]http://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming)

Wazzak
Last edited on
Topic archived. No new replies allowed.