30 Ott 2002
Costruzione di Interfacce - Paolo Cignoni
34
Operator =
•    Person &Person::operator=(Person const &other)
    {
        if (this != &other)
        {
            delete address;
            delete name;
            delete phone;

            address = strdupnew(other.address);
            name = strdupnew(other.name);
            phone = strdupnew(other.phone);
        }
        // return current object. The compiler will
        // make sure that a reference is returned
        return *this;
    }