The destructor must be virtual if a pointer to a base is ever deleted when it actually addresses a derived-type object.

 
  • 因为派生类对象包含基类部分,所以可以将派生类型的引用或指针转换为基类类型的引用或指针。
今日热词
目录 附录 查词历史