C++ Templates

Templates in C++ are the powerful feature that allows us to write generic programs (generic classes and generic functions). A single class or function is created to work with different data types using templates. We pass the data types in …

Read moreC++ Templates

C++ Friend Function

There are private and protected members in a class that is inaccessible from outside of the class, constituting one of the concepts of object-oriented programming i.e. data hiding. However, these rules can be broken by a friend function. A function …

Read moreC++ Friend Function

Inheritance in C++

Inheritance is one of the most important concepts of object-oriented programming. In C++, inheritance is the process of deriving the properties and behaviors of one class to another class. It is like a child and parent where the child possesses …

Read moreInheritance in C++

C++ Encapsulation

Encapsulation is defined as the wrapping up of data(variable) under a single unit. Encapsulation is an important concept of OOP in C++ that binds data and functions inside a class together that manipulate them. Data encapsulation leads to the important …

Read moreC++ Encapsulation