1.

How The Virtual Functions Maintain The Call Up?

Answer»

The call is maintained through vtable. Each object INCLUDES a variable known as VPTR, which points to the class's COMMON vtable. It contains an entry for every VIRTUAL function. On calling the function, vtable calls the appropriate function USING vptr.

The call is maintained through vtable. Each object includes a variable known as vptr, which points to the class's common vtable. It contains an entry for every virtual function. On calling the function, vtable calls the appropriate function using vptr.



Discussion

No Comment Found