ADD Virtual function... not member function.
是添加虚函数不是成员函数。
Why using cannot be used to define a virtual function?
为什么使用不能用于定义一个虚函数?。
This effectively hides the virtual function in the base class.
这有效地隐藏了基类中的虚函数。
Virtual Function is the method to realize dynamic polymorphism.
虚函数是实现动态多态性的方法。
The code generated for the pure virtual function is shown in Listing 1.
为纯虚函数所生成的代码如列表 1 中所示。
This function is really a message handler, not a virtual function.
这个函数是一个真正的消息句柄,不是虚函数。
Firstly, you should know what a virtual function is, and how to use it.
首先,你应该知道什么是虚函数,以及如何使用它。
If a virtual function is private, it cannot be accessed by a derived type.
如果某虚函数为私有函数,则派生类型无法访问它。
The code generated for the virtual function in a header file is shown in Listing 2.
在头文件中为该虚函数所生成的代码如列表2中所示。
Listing 1 defines three classes (a, B and c) with a common virtual function WhoAmI .
清单1定义了三个类(A、b和c),它们有一个共同的虚函数whoami 。
The derived class inherits more than one override of a virtual function of a virtual base class.
派生类继承虚拟基类的虚函数的多个重写。
Now Im going to call virtual function from constructor of Base class rather than member function.
现在,我米要调用基类的构造函数,而不是成员函数虚函数。
However, even a non-virtual function should be tested to ensure that you get the correct results.
但是即便如此,也应测试非虚函数,以确保获得正确的结果。
The error message is issued if someone tries to explicitly construct an object or call a virtual function.
发出错误信息,如果有人试图构建一个明确对象或调用虚函数。
The most important part of the client or server code is the virtual function NotifyReceivedPackage, as described below.
客户端或服务器端最重要的部分是虚函数NotifyReceivedPackage,定义如下。
The only significant cost of virtual functions is one additional memory lookup before a virtual function can be called.
虚拟函数唯一一个明显的代价是在调用虚拟函数之前附加了一个存储查询。
When we use virtual functions, the compiler automatically selects the right function according to the actual type of the object.
当使用虚函数的时候,编译器自动根据对象的实际类型选择正确的函数。
A class function definition has the same name as a virtual function in a base class but not the same number or type of arguments.
类函数定义与基类中的虚函数同名,但参数的数目或类型不同。
If the function was intended to be a static member function, rename it so it doesn't conflict with the base class virtual function.
如果函数用作静态成员函数,则重命名该函数,以便不与基类虚函数冲突。
The experiment has proven that the signal performance generated by virtual function signal generator surpasses ordinary traditional instrument.
实验表明,所设计的虚拟函数信号发生器输出信号性能优于普通传统信号源。
The virtual management pattern includes virtual production, virtual personnel, virtual function, virtual trademark and strategic Allies as well.
企业虚拟经营模式包括虚拟生产、人员虚拟、功能虚拟、品牌虚拟经营和战略联盟。
COM specifies that any interface must follow a standard memory layout, which is the same as the C++ virtual function table (see Rogerson96 in Resources).
COM指定任何接口都必须遵循一个标准的内存规划,这与 C++ 的虚拟函数表(请参阅 参考资料中的 Rogerson96)相同。
Used to flush out status information when a reposition occurs. This is a virtual function that is provided should the codec require resetting prior to use.
用来冲洗出状况的信息时发生复位。这是一个虚拟的职能,这是应该提供的解码需要重新使用前。
Dynamic casts should be used with caution. Whenever possible, it is much better to define and use a virtual function rather than to take over managing the types directly.
使用动态强制类型转换要小心。只要有可能,定义和使用虚函数比直接接管类型管理好得多。
In a base class, abstract class is defined by declaring pure virtual function, a derived class must define all inherited pure virtual functions of its base classes to be concrete.
在基类中可以通过将虚函数声明为纯虚函数的手段来定义抽象类,强制派生类在自己的类定义中实现虚函数的具体功能。
The main reason for making a virtual function inline is to place its definition in the class, either for convenience or to document its behavior, e. g., for accessors and mutators.
使虚函数内联的主要原因在于类定义,主要是方便的原因,比如说成员访问函数。
A function in a derived class attempted to override a virtual function in a base class, but the derived class function did not have the same return type as the base class function.
衍生类别中的函式试图覆写基底类别中的虚拟函式,但衍生类别函式没有与基底类别函式相同的传回型别。
A function in a derived class attempted to override a virtual function in a base class, but the derived class function did not have the same return type as the base class function.
衍生类别中的函式试图覆写基底类别中的虚拟函式,但衍生类别函式没有与基底类别函式相同的传回型别。
应用推荐