I've read in my book that if you use pointers as data members in your class, you likely need to make a new copy constructor, and = operator, and probably also a constructor and destructor.
Now, I can understand the point. Since the default copy-constructor just copies the value of each data-member, the result when doing this on a pointer is simply copying the pointer-adress. Which would make 2 objects pointing to the same space in memory, which usually isnt what the have in mind.
That's all good.
But what about the string-class? It uses pointers and even new / delete behind the scenes.
But I guess the string-class comes with a proper copy constructor and assignment operator?
If so, using strings wouldnt make more trouble than using a normal int, right?
(In the means of pointer and datamember trouble)