Implementation mechanism of virtual functions in C++ programming language

Hua Zhang · 2004

The virtual function in C+G-+ and its importance are introduced in this article, and the implementation mechanism of the virtual function is expounded in detail. It is dynamically bound through a virtual pointer(vptr) and virtual table during the running time, and so different class virtual function are called by the object′s type; and this mechanism is verified through a testing program.

Read the paper · More papers on PaperTik