摘要: // std_tr1__memory__shared_ptr_reset.cpp // compile with: /EHsc #include #include struct deleter { void operator()(int *p) { delete p; } }; int main() { std::shared_ptr sp(new int(5)); //std::boolalpha bool类型输出为true或者false而不是0或者1,默认输出0和1 //reset更换管理对象 std::cout <<... 阅读全文
posted @ 2014-04-07 21:19 zzyoucan 阅读(1052) 评论(0) 推荐(0) 编辑