A:
Never. cos virtual functions has costs.  Each object of virtual function must have a v table to manage them.Therefore using virtual function will need system costs. for only a very small class and dont wanna derive other classes, then it's no need to use virtual functions  in this class at all.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-11-01
  • 2021-11-22
  • 2021-11-29
相关资源
相似解决方案