在这种情况下,Shape的area()方法(译注:得到Shape面积的成员函数)必须是virtual的(可能是纯虚(pure-virtual)的),但Shape::print()可以在Shape中被定义为非虚(non-virtual)的,前提是所有派生类不会需要不同的打印算法。
基于16个网页-相关网页
Pure Virtual Function 纯虚函数 ; 纯虚拟函式 ; 纯虚拟函数 ; 关于虚函数的报错提示
pure virtual 纯虚函数 ; 纯虚拟
pure virtual destructor 定义纯虚析构函数
pure virtual function call 纯虚函数调用 ; 现问题
pure virtual functions 纯虚函数 ; 纯虚拟函数
pure virtual method 纯虚方法
pure virtual simulation 纯虚拟模拟
The code generated for the pure virtual function is shown in Listing 1.
为纯虚函数所生成的代码如列表 1 中所示。
When you don't specify the virtual appliance, VMControl can create a pure virtual server without an OS, just like you created a LPAR in the HMC.
如果没有指定虚拟设备,VMControl可以创建不包含操作系统的纯粹的虚拟服务器,这就像是在HMC中创建LPAR。
A class containing (or inheriting) one or more pure virtual functions is an abstract base class.
类包含或者继承一个或多个纯虚函数,这样的类就是抽象基类。
应用推荐