术语:

  • ctor:constructor,构造函数
  • dtor:destructor,析构函数

构造函数/析构函数

  1. 如果基类要利用多态,则dtor需要声明为virtual,这样在销毁对象时才可以正确调用析构函数。

 

相关文章:

  • 2021-04-22
  • 2021-09-09
  • 2021-06-16
  • 2021-06-19
  • 2021-09-26
  • 2021-05-21
  • 2021-06-08
  • 2021-07-07
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2021-04-21
  • 2022-01-14
  • 2021-04-26
  • 2022-01-15
  • 2021-12-03
相关资源
相似解决方案