阅读背景:

前向声明和析构函数之间的关系

来源:互联网 

I have the following code:

我有以下代码:

#include <iostream>
using namespace std;

class CForward;

void func(CForward* frw) { delete frw; }

class CForward
{
public:
    ~CForward() { cout << "Forward" << endl; }
};

int main()
{
    func(new CForward);
    cin.get();
}
#include



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: