随笔分类 -  c和c++

c和c++
摘要:对象被释放时,成员变量(不是new出来的)会被自动释放 #include <iostream> #include <memory> using namespace std; class Cat { public: int age; ~Cat() { cout << "~Cat" << endl; } 阅读全文
posted @ 2021-03-11 11:08 seekting 阅读(59) 评论(0) 推荐(0)