How the V-Table mechanism works?

Answer Posted / nishikant sahu

V-Table holds the addresses of virtual functions of a class
and type_info structure for RTTI.V-table created class basis.
when an object created compiler secretly inserted the
v-table pointer of the respective class and then Vptr
iterator accordingly. all are done under the hood.

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of I/O library in C++ ?

652


What are the advantages of inheritance in c++?

648


Differentiate between a copy constructor and an overloaded assignment operator.

632


What is exception handling? Does c++ support exception handling?

582


Is c++ used anymore?

576






A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

1736


Explain the difference between new() and malloc() in c++?

618


What is oops in c++?

581


What is dynamic and static typing?

662


what kind of projects are suitable for c and c++

613


What is the use of lambda in c++?

565


What is abstract class in c++?

579


Can we overload operator in c++?

544


Why do we learn c++?

523


Is c++ free?

575