C++/faakher
Expert: Joydeep Bhattacharya - 11/13/2007
Questionsalam 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
AnswerHi 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