Polymorphism In C++ | Static & Dynamic Binding | Lazy & Early Binding In C++

  Рет қаралды 41,370

CppNuts

CppNuts

5 жыл бұрын

JOIN ME
-----
KZfaq 🎬 / @cppnuts
Patreon 🚀 / cppnuts
COMPLETE PLAYLIST
------------
C++ Tutorial For Beginners: • Introduction To C++
STL (Standard Template Library): • STL In C++
ThreadIng In C++: • Multithreading In C++
Data Structures: • Data Structure
Algorithms: • Binary Search
Design Patterns: • Factory Design Pattern...
Smart Pointers: • Smart Pointer In C++
C++14: • Digit Separator In C++
C++17: • std string_view in C++...
C++ All Type Casts: • static_cast In C++
INTERVIEW PLAYLIST
------------
C++ Interview Q&A: • Structural Padding & P...
C++ Interview Q&A For Experienced: • How delete[] Knows How...
Linked List Interview Questions: • Find Kth Node From Bac...
BST Interview Questions: • Search Element In Bina...
Array Interview Questions: • Reverse An Array
String Interview Questions: • Check String Is Palind...
Bit Manipulation Questions: • Find Set Bit In Intege...
Binary Tree Interview Question: • Invert Binary Tree
Sorting Algorithms: • Bubble Sort
C++ MCQ: • Video
C MCQ: • What printf returns af...
C Interview Questions: • Designated Initializat...
QUICK SHORT VIDEOS
-------------
C++ Short : • C++ Short Videos
C Short : • Shorts C Programming MCQ
In this video we will learn about "Polymorphism in C++" programming language. It's a very important topic on oops.
POINS:
There are two types of Polymorphism
A. Compile Time Polymorphism / Static Binding / Early Binding
a. Function Overloading
b. Operator Overloading
B. Runtime Polymorphism / Dynamic Binding / Lazy Binding
a. Function Overriding (Using virtual functions)
For more details please watch full video and do let me know if there is any doubts in comment section.
#oops #cpp #programming #tutorial #computerscience #softwareengineering

Пікірлер: 54
@ronanmcdermott1393
@ronanmcdermott1393 Жыл бұрын
Extremely thorough, covering all nuances. Thank you!
@gagaantic9009
@gagaantic9009 5 жыл бұрын
Thanks for the videos! I’m a college student getting ready for interviews your videos really help me refresh!! :)
@CppNuts
@CppNuts 5 жыл бұрын
You are most welcome Gaga Antic!!
@tianmingguo8271
@tianmingguo8271 2 жыл бұрын
great explanation!!!!! Thank you so much!!! one thing that makes me love your video so much is that your video always includes very sufficient information about one subject and inspires me to explore more about it.
@CppNuts
@CppNuts 2 жыл бұрын
Thanks..
@RAMKUMAR-eb1kq
@RAMKUMAR-eb1kq 2 жыл бұрын
yah
@yohanesSlamet
@yohanesSlamet 3 жыл бұрын
Thx a lot For your work hard on The Video. I am Old enough for become beginner in C++, but because you are good teacher ... I have a lot of courage to work on it .....
@CppNuts
@CppNuts 3 жыл бұрын
Glad to help..
@konstantinrebrov675
@konstantinrebrov675 4 жыл бұрын
I didn't know that problem with the hidden overloaded virtual function. I will definitely return to this video one more time and take notes.
@konstantinrebrov675
@konstantinrebrov675 5 жыл бұрын
Please publish some lectures on advanced exception handling: rethrowing exceptions, stack unwinding, exceptions and destructors, and some possible bugs that may happen.
@CppNuts
@CppNuts 5 жыл бұрын
Yess dude, trying to push as fast as possible. As this is my part-time sometimes it hard even to think about it. But will definitely push these topics, they are really interesting topics.
@deepakkumar-xv4gs
@deepakkumar-xv4gs 3 жыл бұрын
What is the use of override in derived class its behaviour same with this word and vice versa
@user-hc4sw7zr9m
@user-hc4sw7zr9m 4 жыл бұрын
hi,plz i would like u explain construtors and destructors in the simple inhetance
@artem4460
@artem4460 3 жыл бұрын
Hello Rupesh, thank you for the video! I'd like to see from you some video on the topic where you will be discussing C++ books out there from the standpoint of your own experience and providing some details on what was beneficial for you from that book, what was not that good, etc..
@CppNuts
@CppNuts 3 жыл бұрын
Noted.. thanks man..
@frostypanda9317
@frostypanda9317 3 жыл бұрын
Thanks a lot.
@CppNuts
@CppNuts 3 жыл бұрын
Thanks man.
@abhishekrai617
@abhishekrai617 3 жыл бұрын
Very Good Sir
@CppNuts
@CppNuts 3 жыл бұрын
Thanks and welcome
@RahulBhadana_cse
@RahulBhadana_cse 5 жыл бұрын
please make video on overload new and delete operator
@CppNuts
@CppNuts 5 жыл бұрын
Sure man!! Coming in 2-3 days.
@poovendhans1557
@poovendhans1557 4 жыл бұрын
Could you please share the video links for below topics? ->Interface ->virtual table and virtual pointer ->Abstract class ->Virtual Function
@CppNuts
@CppNuts 4 жыл бұрын
Sure...
@poovendhans1557
@poovendhans1557 3 жыл бұрын
@@CppNuts link?
@ibrahimkeita2839
@ibrahimkeita2839 4 жыл бұрын
So if i understand correctly, you can only override functions in the derived class and not the base class?
@CppNuts
@CppNuts 4 жыл бұрын
You can override function from both derived and base class. It's just that if you want to override base then you will inherit base and override or if you want to override derived then you inherit derived class in your class and then override meaning whatever you inherit you can override.
@sugasinipalanisamy7892
@sugasinipalanisamy7892 2 жыл бұрын
Could you please make video of vtable and vptr
@arnavkapoor2674
@arnavkapoor2674 3 жыл бұрын
please from next video make the font size a little bigger🙏🙏
@CppNuts
@CppNuts 3 жыл бұрын
Ok i will try.. thanks..
@akshaysapkale6027
@akshaysapkale6027 4 жыл бұрын
Which IDE is this? Because in our college they still use Borland's Turbo C++ 3.0
@CppNuts
@CppNuts 4 жыл бұрын
Its sublime test editor, but you will have to attach compiler with it.
@harshalshirole2157
@harshalshirole2157 4 жыл бұрын
hi @CppNuts, We can use double pointers in polymorphism?
@CppNuts
@CppNuts 4 жыл бұрын
what do you mean by using double pointer in polymorphism?
@harshalshirole2157
@harshalshirole2157 4 жыл бұрын
@@CppNuts yes
@harshalshirole2157
@harshalshirole2157 4 жыл бұрын
How we can use double pointer in Polymorphism? is It possible or not?
@CppNuts
@CppNuts 4 жыл бұрын
@@harshalshirole2157 i have written a program for your question please check. coliru.stacked-crooked.com/a/2fe896c349a04e6b
@harshalshirole2157
@harshalshirole2157 4 жыл бұрын
@@CppNuts Yeah got it Thank You
@biswaranjan3550
@biswaranjan3550 5 жыл бұрын
Hello Sir I have one doubt why function overloading cannot distinguished with there return type any specific reason .
@CppNuts
@CppNuts 5 жыл бұрын
One reason i could say is, it would be very much confusing and compiler will have to do hell lot of work to actually verify that it is binding to the right function. And another thing is i really fail to see any benefits of that. So may be its of no use so this feature is not provided.
@biswaranjan3550
@biswaranjan3550 5 жыл бұрын
@@CppNuts thanks
@CppNuts
@CppNuts 5 жыл бұрын
You are welcome!!
@sabbulingineni
@sabbulingineni 4 жыл бұрын
please share virtual table and vptr concept
@CppNuts
@CppNuts 4 жыл бұрын
Sure, wait for some time.
@pritamdevdare5232
@pritamdevdare5232 2 жыл бұрын
please tell me how runtime polymorphism actually applied?
@aparnasa8688
@aparnasa8688 4 жыл бұрын
Why function overloading when we can use template classes?
@CppNuts
@CppNuts 4 жыл бұрын
Let's suppose you want to add two variables so if they are int, float, double, sort then it is fine you can use one function temple and it will work, but if data type is char then you don't want to add you want to append them then you need explicit function in case of char. Now you can overload that function with explicit char data type. So we need both.
@michadudkiewicz3902
@michadudkiewicz3902 4 жыл бұрын
15:36- that's not true what You are saying here. Actually using these two keywords (override and virtual) in same method will give You a warning while compiling saying there is no point in marking an overridding method virtual as all methods that override are automatically virtual (as You mentioned in the beginning, but somehow forgot about the fact) :)
@AshokKumar-mk1nr
@AshokKumar-mk1nr 4 жыл бұрын
Thanks for the videos... Can you tell, How that object calling works, like c3 = c1 + c2.. c1 contain 1,3 and c2 contain 2, 5, then c3 = c1 + c2.. when object c1 called how c2 takes as reference, please make it clear once..
@CppNuts
@CppNuts 4 жыл бұрын
This is full playlist on operator overloading. kzfaq.info/get/bejne/erx9jbOA2Z6VZnk.html
@Vineeth_Shankar
@Vineeth_Shankar 3 жыл бұрын
Can you explain how virtual functions are implemented internally?
@CppNuts
@CppNuts 3 жыл бұрын
Sure..
@KaramAbuGhalieh
@KaramAbuGhalieh 3 жыл бұрын
you did not made it clear about overriding with different parameters
@CreeperHaunterDavid
@CreeperHaunterDavid 4 жыл бұрын
the runtime polymorphism examples are poorly chosen.
size_t In C And C++
6:48
CppNuts
Рет қаралды 33 М.
Pure Virtual Function In C++
16:15
CppNuts
Рет қаралды 13 М.
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 40 МЛН
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 53 МЛН
Dynamic Binding (Polymorphism) With The Virtual Keyword | C++ Tutorial
9:57
Virtual Function In C++
15:08
CppNuts
Рет қаралды 34 М.
Static Data Member And Static Member Function In C++
17:19
CppNuts
Рет қаралды 51 М.
C# polymorphism 🎭
5:11
Bro Code
Рет қаралды 74 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 741 М.
Compile-time vs run-time polymorphism with C++
13:57
constref
Рет қаралды 3,4 М.
Virtual Destructor In C++
10:17
CppNuts
Рет қаралды 15 М.
Rust Data Modelling Without Classes
11:25
No Boilerplate
Рет қаралды 165 М.
Const Data Member In C++
15:03
CppNuts
Рет қаралды 22 М.
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 40 МЛН