First of all, what is function overloading? Function overloading is a feature of a programming language that allows one to have many functions with same name but with...
Share
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 exa...
Share
In C++ and Java, functions can not be overloaded if they differ only in the return type.
For example, the following program C++ and Java programs fail in compilatio...
Share
Predict the output of following C++ program.
#include<iostream>
using namespace std;
  
class Test
{
protected:
    ...
Share
Although polymorphism is a widely useful phenomena in C++ yet it can be quite complicated at times. For instance consider the following code snippet:
#includ...
Share
In C++, stream insertion operator “<<” is used for output and extraction operator “>>” is used for input.
We must know follow...
Share
In C++, we can make operators to work for user defined classes. This means C++ has the ability to provide the operators with a special meaning for a data type, this ...
Share
We have introduced operator overloading. In this post overloading of index operator [] is discussed.
Following are some useful facts about overloading of [].
1) Over...
Share
Method Overloading is the common way of implementing polymorphism. It is the ability to redefine a function in more than one form. A user can implement function overl...
Share
Prerequisite: Constructors in C#
It is quite similar to the Method Overloading. It is the ability to redefine a Constructor in more than one form. A user can implemen...
Share