Hi..
first of all, I want an answer in details if u dont mind..
When we use a class with Pointer data members,why do we need to:
- include a destructor and a copy constructor in the class
- overload an assignment operator which return pointer this
for example:
// function definition
const className& className::operator=(const className& Object)
{
//local declaration
if(this != &Object)
{
//algorithm to copy Object into this object
}
//return the object assigned
return *this;
}
can we use the other object name instead of pointer this just to assign the values?
thanks for your time..^^..