2014年7月22日

【STL】-pair的用法

摘要: 初始化: std::pair p; //initialize p.first and p.second with zero std::pair p(42, "hello"); make_pair(42, "hello"); // no need for the var name, it's r... 阅读全文

posted @ 2014-07-22 08:54 醉清风JM 阅读(179) 评论(0) 推荐(0)

【STL】-auto_ptr的用法

摘要: 初始化:1 #include //auto_ptr header2 void f()3 {4 auto_ptr ptr(new classA);5 }拷贝:1 //auto_ptr can't be initialized by = operator2 auto_ptr ptr1(new cla... 阅读全文

posted @ 2014-07-22 08:53 醉清风JM 阅读(217) 评论(0) 推荐(0)

导航