can someone tell me if my assignment operator looks ok. i am suppose to delete in the assignment right. sorry i did the copy constructor now im doing the assignment operator. no more operators today after this :)
this thread is a little old but i wanted to answer. its because it was an exercise for myself. just so i know how. i know i could have used a regular int but that wasnt what i was trying to learn. design wasnt even the issue. i was trying to learn how to deal with assignment operators and copy ctors when your class contained a object on the heap and form. i looked at your code and agree its more straightforward. i actually had used that at one point but i thought it wasnt checking for self assignment. after reading the c++ faq i realized there is more then 1 way to check for self assignment so its ok. i will use your way in the future if i can.