搜索资源列表
C++中的虚函数(virtual function)
- C++中的虚函数(virtual function)-C of the virtual function (virtual function)
VTABLE
- 用C实现虚函数表的例子,可以实现面向对象的思想-C realization of the virtual function table example, can achieve the object-oriented thinking
虚函数的使用技巧
- 这个主要讲了在C++中虚函数的使用技巧,众所周知,虚函数的使用是C++中一个难点,希望这个对大家有帮助-the main speakers in the C function of the use of virtual skills, as we all know, the use of virtual function C is a difficult issue, we hope that the right help
虚函数介绍
- 这个主要通过简单的实例介绍了C++中虚函数,对虚函数有个更清楚地认识-this mainly through a simple example of virtual function C, the virtual function has a clearer understanding
虚函数语法
- 对于编程来说,编程思想重要,而语法也是不可忽略的,这个就是介绍C++ 中虚函数的语法-for programming, the programming idea is important, and grammar is not overlooked, the C is introduced virtual function syntax
studentdomitorymanagement
- 实现学生宿舍信息的基本管理,采用了面向对象的思想,用到虚函数,多重继承,多态-achieving student hostels basic information management, the use of the object-oriented thinking, use virtual function, multiple inheritance, polymorphism
virtul_test
- 该压缩包包含一些虚函数的测试程序,为下载程序-the compressed contains virtual function testing procedures for download
Chapt-13
- 多态性与虚函数-polymorphism and virtual function
inheritence
- 普通函数的重载,虚函数的重栽,指向派生类对象的基类指针对重载函数的调用-ordinary function overloading, the virtual function re-planting, point to objects derived category refers to the base class against heavy function call
c++primeranswer
- C++ Primer 第三版 学习辅导 类的创建、继承、虚函数的使用 bugzhao@sohu.com 原书第23~40页 可以将断点设置在return 0处,然后按F5, 并记录下所有整型数组类ia指针的值,比如: 0x00491f90 0x00491f50 0x00490120 0x00491da0 0x00491d50 然后当调试指针停在return 0处时单步执行, 跟踪每一次析构函数,可以发现后创建的对象最先被消除。
0201虚函数表
- 在VC6.0平台实现。从本程序可以了解到C++虚函数的实现方法。是COM+技术中vtable虚函数表的基础实现。-in VC6.0 platform. From this program can understand C + + virtual function of the method. COM technology is the virtual function table vtable the basis of achievement.
3.3.2纯虚函数和抽象类
- 纯虚函数和抽象类。一个有关VC++虚函数的源程序,比较适合VC++初学者。以后我上传一系列这种类型的源程序供大家学习之用。-pure virtual function and abstract category. The VC a virtual function of the source, more suitable for beginners VC. After I uploaded a series of this type of source for all learning.
3.3.1虚函数
- 虚函数的使用。又一个有关VC++虚函数的源程序,比较适合VC++初学者。以后我上传一系列这种类型的源程序供大家学习之用。-virtual function use. The VC also a virtual function of the source, more suitable for beginners VC. After I uploaded a series of this type of source for all learning.
虚函数表深度分析
- 关于虚函数表的机制:1:虚表(虚函数表)是for类的 2:基类和派生类是各有各的表,也就是说他们的物理地址是分开的,基类和派生类的虚表的唯一关联是:当派生类没有实现.-on the virtual function table mechanisms : 1 : virtual table (virtual function tables) for the two categories : base class and the derived class is their own table, m
利用虚函数实现多态性求四种几何图形的面积和
- 利用虚函数实现多态性求四种几何图形的面积和
C++类模版和虚函数
- (1)定义一个抽象基类Shape,同它派生出5个类:圆、正方形、矩形、梯形、三角形。 (2)利用虚函数计算几种图形面积,并利用运算符重载输入输出图形的基本属性 (3)演示构造函数、复制构造函数、析构函数的作用和调用顺序 (4)用类模板具体实现。
du
- 定义一个包含两个纯虚函数的抽象类shape: class shape { public: virtual float Area()=0; virtual void SetData(float,float=0)=0; }; 成员函数SetData用于设置几何图形的属性值。成员函数Area()用于求出几何图形的面积。由shape派生出四种几何图形,分别是:三角形、矩形、正方
虚继承
- 定义ChildLabourer童工类,公有继承工人类和儿童类,从而形成菱形继承关系 在main函数中通过new实例化ChildLabourer类的对象,并通过该对象调用Person,Worker及Children类中的成员函数,最后销毁该对象,掌握多重继承,多继承,虚继承的定义方法。(Defines the ChildLabourer child class, the public successor worker, the human and the child class, thus fo
实验一虚函数
- VC++中的虚函数的实例,用于理解虚函数(An example of virtual function)