2014年12月12日

摘要: shared_ptr智能指针 shared_ptr 的声明初始化方式由于指针指针使用explicit参数 必须显示声明初始化shared_ptr pNico = new string("nico"); // ERRORshared_ptr pNico{new string("nico")}; // ... 阅读全文
posted @ 2014-12-12 14:28 itdef 阅读(1225) 评论(0) 推荐(0)
摘要: pair以模板的方式存储两个数据namespace std {template struct pair {// memberT1 first;T2 second;...};}p.first p.second get(p) C++11get(p) C++11示例 PairPrintTest()//==... 阅读全文
posted @ 2014-12-12 13:46 itdef 阅读(373) 评论(0) 推荐(0)

导航