当前位置:网站首页>The relation between virtual function and pure virtual function

The relation between virtual function and pure virtual function

2022-06-12 05:30:00 Wildcraner

Define a function as a virtual function , Does not mean that the function is not implemented .
It is defined as a virtual function to allow a pointer to the base class to call this function of a subclass .
Define a function as a pure virtual function , It means that the function is not implemented .
A pure virtual function is defined to implement an interface , Play a normative role , The programmer who inherits this class must implement this function .

原网站

版权声明
本文为[Wildcraner]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120530069606.html