C++/faakher

Advertisement


Question
salam sir:
sir what is the draw back of function n c++
and another question is that what is function overriding and its importance in simple programming.
thanks
babye

Answer
Hi Faakher

The main drawback of function is it increases the execution time as the main function is pushed inside the stack when the others are called.

Function Overriding is the feature of object oriented programming suppose i have created a class called matrix which does all the matrix operation now you have found that my matrix class is of great help for your project except for a function called showMatrix which is present in my class, now what you can do is you can derive a class called myMatrix and simply use all the feature of my class except for that showMatrix which you have defined again inside your class there by overriding the function showMatrix. In simple word while deriving a new class if you need to modify some function just redefine the function in your class with the same name and use it.

In case if you still have any doubt plese feel free to get back to me.

regards
Joydeep Bhattacharya
http://www.scodz.com

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joydeep Bhattacharya

Expertise

TSR, Socket and Very Complex Mathematical Problem

Experience

Worked on many OOP projects with design patterns

Organizations
http://www.scodz.com

Publications
http://www.scodz.com

Education/Credentials
Master of Computer Applications

Awards and Honors
Being a proud owner of a website of programming called http://www.scodz.com

Past/Present Clients
http://www.funforu.com http://www.dhoondho.com http://analysingc.50webs.com

©2016 About.com. All rights reserved.