摘要: 用auto_ptr 指向数组类型是有问题嘀!#include <iostream>#include <memory>#include <string>using namespace std;int c= 0;class X{ public: X(): s("01234567879") {++c;} ~X() {--c;} private: string s;};template <class T>void f(size_t n){ { auto_ptr<T> p1(new T); auto_ptr<T> 阅读全文
posted @ 2011-11-19 18:52 maadiah 阅读(249) 评论(0) 推荐(0) 编辑