文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>noncopyable implementation in C++

noncopyable implementation in C++

时间:2011-03-13  来源:Ray Z

 1 #include <iostream>
 2 using namespace std;
 3 
 4 class noncopyable
 5 {
 6 protected:
 7     noncopyable(){}
 8     ~noncopyable(){}
 9 private:
10     noncopyable(const noncopyable&);
11     const noncopyable& operator=(const noncopyable&);
12 };
13 
14 class myclass : private noncopyable
15 {
16 public:
17     myclass()
18     {
19         cout << "my class" << endl;
20     };
21 };
22 
23 int main()
24 {
25     myclass o;
26     //myclass o2(o);
27     //myclass o3 = o;
28     cin.get();
29 }
相关阅读 更多 +
排行榜 更多 +
宝宝情商养成宝宝巴士

宝宝情商养成宝宝巴士

休闲益智 下载
燥热手机版

燥热手机版

飞行射击 下载
巨人狙击手安卓版

巨人狙击手安卓版

飞行射击 下载