In this video we will study and understand the concept of Function Overriding and compare with with Function Overloading and how they both are different from each other.
We will compare them theoretically and then we will also see a c++ program example of function overriding.
Function Overloading – Function overloading is a feature in C++ where two or more functions can have the same name but different parameters.
Function overloading can be considered as an example of polymorphism feature in C++
Function Overriding – If derived class defines same function as defined in its base class, it is known as function overriding in C++
If you create an object of the derived class and call the member function which exists in both classes (base and derived), the member function of the derived class is invoked and the function of the base class is ignored.
It enables you to provide specific implementation of the function which is already provided by its base class.
Function Overriding in C++ Theory Article –
Download Dev C++ IDE :
Download C++ Android App :
Simple Snippets Official Website –
Simple Snippets on Facebook-
Simple Snippets on Instagram-
Simple Snippets Google Plus Page-
Simple Snippets email ID-
simplesnippetsinfo@gmail.com
For Classroom Coaching in Mumbai for Programming & other IT/CS Subjects Checkout UpSkill Infotech –
UpSkill is an Ed-Tech Company / Coaching Centre for Information Technology / Computer Science oriented courses and offer coacing for various Degree courses like BSc.IT, BSc.CS, BCA, MSc.IT, MSc.CS, MCA etc.
Contact via email /call / FB /Whatsapp for more info
email – upskillinfotech@gmail.com
We also Provide Certification courses like –
Android Development
Web Development
Java Developer Course
.NET Developer Course
Check us out on Social media platforms like Facebook, Instagram, Google etc
Facebook page –
Insta page –
Google Maps –
Nguồn: https://chototdayroi.com
Xem thêm bài viết khác: https://chototdayroi.com/cong-nghe/
Xem thêm Bài Viết:
- Bluezone sẽ giúp thu hẹp phạm vi cách ly, giúp xã hội duy trì hoạt động
- Triển khai Bluezone trên diện rộng để truy vết lây nhiễm Covid-19 tại Hải Dương
- Mỹ cấp tốc soạn luật hỗ trợ báo chí đàm phán với Facebook, Google
- Shop online bán vài trăm đơn ngày Tết, shipper kiếm tiền triệu mỗi ngày
- Người dân đã có thể khai báo y tế trực tuyến qua ứng dụng Bluezone
Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
sir ,
If it is hierarical inheritance then we have to create the object for CAT only. . . . .
but u created the objects for evry fn.
Good tutorial
But stop saying there is another tutorial on this topic another tutorial on this topic another tutorial on this topic.
Can find that as this one also .
Irritating. plz
thnx.
Good tutorial
But stop dropping cards.
About the explanation before the coding. Can we access the function while creating object from the Base class and not the Derived class?
Very good explanation, first time learning this and i was able to grasp this topic instantly. Thank you for your amazing videos. 😁👍
but then when do we use virtual functions??
what is the general meaning of scope resolution func i.e. double colon??
Nice explanation 🔥
Function overriding small error semicolon while overriding getdata() in derived class
did you say "shapes" or "Sheeps" thanks for the work but i didnt understand the diagrams properly
thanks aloot
The example should have been the one with figures and areas, not the concept already saw on diagrams before! Just an advice, great videos! Thanks 🙂
DerivedClass obj = DerivedClass();
BaseClass obj = DerivedClass();
wats this can you explain and how it is suppose to transfer the control to the base function
i read it somewhere else
I am using codeBlocks. There it shows
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
C:UsersUSERDocuments39.cpp||In function 'int main()':|
C:UsersUSERDocuments39.cpp|15|error: 'void Dog::makesound()' is private|
C:UsersUSERDocuments39.cpp|35|error: within this context|
C:UsersUSERDocuments39.cpp|22|error: 'void Cat::makesound()' is private|
C:UsersUSERDocuments39.cpp|39|error: within this context|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
why it is so?
You are awesome sirr…..🙏🙏🙏
great teacher .love the way you do it..
can you just add some more practical examples from dev cpp.
The fuck is this x10 speed? I cant understand shit.
Dude I have a doubt what is the use of scope operator ,which we write after the function signature like void abc::cde(). ?
Create more example!😊
Function overriding to achieve why virtual function you have not used. You have missed
When he said "shapes" I thought he said "sheeps" lmao
Awesome explaination…..plz guide me how i can improve my vocabulary
Where are u from
Hi
Good English
sir I have watched both videos
sir, I think overriding is used in inheritance and overloading is used in simple class
Am I right sir ?
i am very sorry to have written the previous comment
Thanks man
I thought function overriding was only possible with virtual functions.