Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last updated: Aug 7, 2022

Virtual Functions

A virtual function is a member function within the base class that we redefine in a derived class. It is declared using the virtual keyword. When a class containing a virtual function is inherited, the derived class redefines the virtual function to suit its own needs. Basically, a virtual function is used in the base class in order to ensure that the function is overridden. This especially applies to cases where a pointer of the base class points to an object of a derived class.
Difference in default virtual functions and pure virtual functions in C++
In this article, we have discussed the differences between virtual functions and pure virtual functions in c++, where the base number and power are given or entered by the user.
Virtual Constructor and Destructor EASY
In this article, we will learn about virtual constructors and destructors. We will discuss the creation of virtual constructors and destructors.
Virtual Copy Constructor EASY
In this blog, we shall discuss the working and use of a Virtual Copy Constructor in C++ with the help of various examples.
Run-Time Type Information (RTTI)
In this blog, we will be having a detailed discussion on Run-Time Type Information with the help of relatable example codes.
Can virtual functions be private? EASY
In this article, we will learn about virtual functions and if virtual functions can be private with the help of codes.
Pure Virtual Function in C++ EASY
Explore the concept of pure virtual functions in C++, their role in creating abstract base classes, and its advantages. Learn more in our comprehensive article.
Pure virtual destructor
In this blog, you will learn about Pure virtual destructor.