As we know that a class cannot access the private members of other class. Similarly a class that doesn’t inherit another class cannot access its… [Read More]
Pass and return Object from a function in C++
In this tutorial we will see how to pass an object to a function as an argument and how to return an object from a… [Read More]
Enumeration in C++
Enum is a user defined data type where we specify a set of values for a variable and the variable can only take one out… [Read More]
Structure and Function in C++
In this previous tutorial we learnt about structures, the compound data type that groups different types of variables. In this tutorial, we will learn how… [Read More]
Structures in C++
Structure is a compound data type that contains different variables of different types. For example, you want to store Student details like student name, student… [Read More]
Interfaces in C++: Abstract Class
In C++, we use terms abstract class and interface interchangeably. A class with pure virtual function is known as abstract class. For example the following… [Read More]
Abstraction in C++ with example
Abstraction is one of the feature of Object Oriented Programming, where you show only relevant details to the user and hide irrelevant details. For example,… [Read More]
Encapsulation in C++ with example
Encapsulation is a process of combining data members and functions in a single unit called class. This is to prevent the access to the data… [Read More]
Virtual functions in C++: Runtime Polymorphism
In this guide, we will see what are virtual functions and why we use them. When we declare a function as virtual in a class,… [Read More]
Difference between Function Overloading and Function overriding in C++
Function overloading and Function overriding both are examples of polymorphism but they are completely different. Before we discuss the difference between them, lets discuss a… [Read More]
Function Overriding in C++
Function overriding is a feature that allows us to have a same function in child class which is already present in the parent class. A… [Read More]
Function Overloading – Call of Overloaded Function is ambiguous
In the Function overloading tutorial, we have seen how to overload a function by providing the same function with different number, type or sequence of… [Read More]
Function overloading in C++
Function overloading is a C++ programming feature that allows us to have more than one function having same name but different parameter list, when I… [Read More]
Polymorphism in C++
Polymorphism is a feature of OOPs that allows the object to behave differently in different conditions. In C++ we have two types of polymorphism: 1)… [Read More]
Inheritance in C++
Inheritance is one of the feature of Object Oriented Programming System(OOPs), it allows the child class to acquire the properties (the data members) and functionality… [Read More]