V
V
Vorobeez2013-12-24 14:45:15
OOP
Vorobeez, 2013-12-24 14:45:15

Where can I learn more about the dynamic binding mechanism?

Can you please tell me where you can learn in detail about the dynamic linking mechanism, how it works? Preferably in C++.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
s0L, 2013-12-24
@Vorobeez

Well, then everything is very simple, there is a lot of material https://www.google.ru/search?q=cpp+vtable
In short, each object has a pointer to a table with the addresses of its virtual functions. Different classes - different contents of the plates. Due to this, the method of the desired class for the object is called by its table, and not by the type of the pointer.

J
jcmvbkbc, 2013-12-24
@jcmvbkbc

If you know assembler, it will be very instructive to write a simple example with a virtual function and see how it works in native code. There's quite a bit.

I
Ilya Evseev, 2013-12-24
@IlyaEvseev

www.cs.wustl.edu/~schmidt/PDF/C++-dynamic-binding4.pdf
is it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question