Assignment Operator in C++

The declaration of class CMyString is found in Listing 2-9. Please add an assignment operator to it.

Listing 2-9. C++ Code for Declaration of CMyString 
 class CMyString {
 
public:
    CMyString(char* pData = NULL);
    CMyString(const CMyString& str);
    ~CMyString(void);
private:
    char* m_pData;
};
www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

No comments: