On the example code:
I don't think you can add anything to the function name when overloading an operator. So on line 23, it should just be void operator =. And also, is int *pointer an array? If so, why is it only being initialized in the assignment operator class? Also, it is a good idea to use a copy constructor, destructor, and assignment operator if you need to use one. Finally, as I learned this week, the typical method implementation for assignment operator's is to use copy-and-swap, like described here:
http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Copy-and-swap .
This question may also be relevant:
http://www.cplusplus.com/forum/beginner/147366/
On the use, why:
You said it yourself, to assign values of one object to another. Normally, this is all handled for you by the default assignment operator. However, when dealing with pointers and memory on the heap, these aren't enough to get the job done most of the time. There will be ambiguities, bugs, and errors. That's why there are custom assignment operators, copy constructors, and destructors: to make sure each object gets its a copy for itself of data that it owns, and when they are done with the data, it goes away neatly.