摘要: #include "boost/smart_ptr.hpp"相当于同时 include 了各个智能指针(请查看smart_ptr.hpp源文件)class User{ void print() { std::cout<<"test"<<std::endl; }};int main(){typedef boost::share_ptr<User> UserPtr; boost::shared_ptr<User>(new User) user_ptr1;boost::shared_ptr<User> 阅读全文
posted @ 2012-08-02 19:12 轻典 阅读(199) 评论(0) 推荐(0) 编辑