In a class example in a C++ book, there is an overloading of the assignment operator with the following lines:
delete m_pName; m_pName = new string(*(c.m_pName));