Virtual Functions

preview_player
Показать описание
Virtual Functions Concept explained easily with diagrams.
Рекомендации по теме
Комментарии
Автор

Excellent explanation. Virtual functions are used in system. verilog too. This clears a lot of doubts

deuduttanagori
Автор

Great Explanation sir... thoroughly understood virtual functions... Thank You!!!

voidzero
Автор

Thank you, sir, very clear and concise. Other videos on Youtube are usually more than half an hour but not touching the main idea of the virtual functions.

yuka
Автор

Excellent explanation..I went on different videos to understand virtual functions but your explanation was best...very clear.

sharvilshah
Автор

Very clearly explained. I strongly feel you should do more videos in C++ and put up your notes in a site accessible to the public.

jayanthibalasubramanian
Автор

super sir....great work with real time

bbshabarinath
Автор

Thank you a lot for being so clear and helpful!

jintao
Автор

Good work Sir...Very nice explanation.

abisheksindhe
Автор

Hi can you please confirm whether vtable created per class or per object, it should be per class, as vtable has only function pointers,

pavanpongle
Автор

thanks it is very useful for beginners.

Mr.Kaduru
Автор

Good Explanation and expecting .NET framework explanation in the upcoming days

nanerakesh
Автор

Awesome explanation !! You should be doing more videos for your clarity of teaching :)

Cadenza
Автор

Sir, 14:08 example
What will happen if in class shape: virtual void Draw() =0;//pure virtual function.
Will your program still run because we are creating here an object of abstract class(which contains pure virtual function)???

AbhishekKumar-imxd
Автор

thanqq sir, , , it really help us to understand

vijaykumarkari
Автор

i have a doubt sir
what will happen if class D1 has 1 more function like:
public:
virtual void function1(int x){}
is it method hiding?
and, what will be the entry in D1 Vtable ?

HARI-jsgk
Автор

Sir, I think there is a flaw in your explanation. At 10:08 you said every object will have a virtual table (vtable) which isincorrect.
vtable is per class basis (only in class containing virtual functions). Whereas virtual pointer (vptr) is per object/instance basis of the class (containing virtual functions). That is instance contains pointer to vtable (vptr).
If vtable was constructed per instance/object basis then memory usage will increase greatly compared approach of just creating a pointer to virtual table.

openembeddedworkshop
Автор

Its very helpful...I have a doubt that how vptr get involved with each object while calling a virtual function?

utkalikasamal
Автор

Hi Ashwin, can please explain about base class *vptr and Derived *Vptr(inharied) ?

govindrao
Автор

virtual pointer and virtual table concepts are not very clear sir. understood what is happening, but didn't understand why it is happening.

kartikpodugu
Автор

Why do we need pointers to base class? And further why would we need the parent to control the derived class function redefinitions.  Why not just use the derived class objects to control their redefined functions by themselves?

camel