摘要:
方法一:使用另一个实现类分装类的私有成员和函数,这种方法称为Pimpl方法。,也就是组合的方法。#include <boost/shared_ptr.hpp>#include <iostream>class CTest{public:CTest();~CTest() {std::cout<<"CTest destructor!"<<std::endl;}void do_something();private:class CTestImp;boost::shared_ptr<CTestImp> pimpl_;};cl 阅读全文
posted @ 2010-04-03 11:05
小 楼 一 夜 听 春 雨
阅读(1137)
评论(0)
推荐(0)

浙公网安备 33010602011771号