使用Word发送,测试一下

代码:

class AutoDeleteArPtr

{

public:

    explicit AutoDeleteArPtr(char* &cPtr)

    {

        m_cPtr=cPtr;

    }

    ~AutoDeleteArPtr()

    {

        if (NULL != m_cPtr)

        {

            delete[] m_cPtr;

            m_cPtr = NULL;

        }

    }

private:

    AutoDeleteArPtr(const AutoDeleteArPtr& adap);

    AutoDeleteArPtr& operator=(const AutoDeleteArPtr& rhs);

private:

    char* m_cPtr;

};

posted @ 2013-04-16 19:10  蛮大人  阅读(176)  评论(0编辑  收藏  举报