文件名称:FISH-AND-ANIMAL-CPP
介绍说明--下载内容均来自于网络,请自行研究使用
C++编译器在编译的时候,发现Animal类的breathe()函数是虚函数,这个时候C++就会采用迟绑定(late binding)的技术,在运行时,依据对象的类型(在程序中,我们传递的Fish类对象的地址)来确认调用的哪一个函数,这种能力就做C++的多态性。-C++ compiler during compilation, found the Animal class breathe () function is a virtual function, the c++ will use late binding (newest) binding technology, at runtime, depending on the type of the object (in the program, we pass the address of Fish class object) to confirm which one function call, the ability to do the polymorphism of c++.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
FISH AND ANIMAL C++\Animal.cpp
...................\Animal.h
...................\Fish.cpp
...................\Fish.h
...................\Main.cpp
...................\Test.cpp
...................\WinMain.cpp
FISH AND ANIMAL C++