64,648
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <memory>
using namespace std;
class CData
{
};
class CTable
{
public:
CTable() {}
~CTable() {}
void SetData(CData *pData) {}
};
int main()
{
unique_ptr<CData> pData(new CData);
unique_ptr<CTable> pTable(new CTable);
pTable->SetData(pData);
return 0;
}