摘要: #include <vector>using namespace std;class CDemo{public:CDemo():str(NULL){}~CDemo(){if(str) delete [] str;}char *str;};int main(){CDemo d1;d1.str = new char[32];strcpy(d1.str, "trend micro");vector <CDemo> *a1 = new vector <CDemo>();a1 -> push_back(d1);delete a1;return 阅读全文
posted @ 2011-03-10 21:41 樱色布 阅读(3635) 评论(0) 推荐(0) 编辑