#include <iostream>
#include <list>

class destructor_test{
public:
  ~destructor_test(){
    std::cout << "~destructor_test" << std::endl;
  }
};

class test{
private:
  destructor_test destructor_test_instance;
};


int main ()
{
  test * test_instance = new test();
  delete test_instance;

  return 0;
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案