C++学习笔记: 智能指针

时间:2023-03-10 00:14:18
C++学习笔记: 智能指针

c++ 智能指针学习新的

 class Simple {
public:
Simple(int param = ) {
number = param;
std::cout << "Simple: " << number << std::endl;
} ~Simple() {
std::cout << "~Simple: " << number << std::endl;
} void PrintSomething() {
std::cout << "PrintSomething: " << info_extend.c_str() << std::endl;
} std::string info_extend;
int number;
};