answersLogoWhite

0

What is meant by function overriding in c plus plus?

Updated: 8/19/2019
User Avatar

Wiki User

11y ago

Best Answer

Function overriding applies to class member functions (methods), where a derived class provides a more specialised implementation of its generic base class method. An override can still call the base class method and augment it with other instructions (before or after the call to the base class method), or it can provide a complete implementation of its own without calling the base class method.

Classes that are intended to act as generic base classes will generally declare their methods to be virtual, meaning they are intended to be overridden, if required.

Abstract base classes will contain one or more pure-virtual methods (which may or may not provide a generic implementation), meaning classes must be derived from the abstract base class and all the pure-virtual methods must be overridden in the derived class (otherwise they, too, become abstract). Only classes that fully implement all the pure-virtual methods they inherit from their base classes can actually be instantiated. That is, you cannot instantiate an instance of an abstract base class, even if it provides generic implementations for all its pure-virtual methods. They can only be instantiated by deriving classes from them.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is meant by function overriding in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is overriding a dynamic polymorphism in c plus plus or not?

In C++, overriding and function, method, or operator is a different thing than (dynamic) polymorphism, so overriding a polymorphic method is almost entirely possible.


What is a primary function in C plus plus?

There is no such thing. You probably meant the main function. The main function is the only function that is required as it serves as the entry point of the program.


What are the building function in c plus plus?

There is no such term as "building function" in C++.


What is meant by println in c plus plus?

println is not a C++ keyword.


A c plus plus statement that invokes a function is known as?

...a function call.


When will you make a function inline in c plus plus?

yes,we can make function inline


What is the only function all C plus plus programs must contain?

Every C plus plus program that is a main program must have the function 'main'.


In C plus plus when a function is executing what happens when the end of the function is reached?

Control is returning to the caller of the function.


What do you call an object function in c plus plus?

method


What is a main function in c plus plus?

It is the first function that gets called when the program is executed.


Call by function in c language?

I guess you meant the following:'In C language, when you call a function,the parameters are passed by-value.'


What is the function y equals ax2 plus bx plus c?

It is a quadratic function which represents a parabola.