C++ Encapsulation

C++ Encapsulation is a feature of object oriented programming OOP. Data encapsulation is the concept of binding data and methods in a single unit called class. Encapsulation means hiding some features of code from the user. Combining similar data like variables and functions in a single class helps to achieve encapsulation. A class is a … Read more

Categories C++

C++ Abstraction

C++ Abstraction is one of the most important features of C++ object oriented programming. Abstraction means to hide some features of the code and display only necessary information to user. Data abstraction provides the capability to hide implementation details of the data and show only needed information for user interaction to the outside world. Data … Read more

C++ Polymorphism

C++ Polymorphism is one of the most important feature of Object Oriented Programing OOP. In the word Polymorphism, poly means many and morph means form. Polymorphism means the phenomenon of having many forms. In C++ programming language, C++ polymorphism refers to the phenomenon where there are multiple classes in a code and classes relate to … Read more

C++ Inheritance

C++ object oriented programming provides the feature of C++ inheritance using classes. Inheritance is the phenomenon of inheriting some or all members of a class by another class. Members can be variables and functions. Inheritance works between classes. The classes in inheritance are: Base class or Parent class Derived class or Child class The relationship … Read more

C++ Classes and Objects

C++ classes and objects are the main components of object oriented programming. Classes are user defined that contain methods and attributes. An object is blue print of the class. Class contains the properties of that object. For example, vehicle is a class that contains the definition for all types of vehicles. The types of vehicles … Read more

C++ Object Oriented Programming

In C++ OOP stands for Object Oriented Programming. As the name suggests, in Object Oriented Programming, a programmer works with objects. Objects are main entities of OOP that contain both data and functions. Contrary to the procedural programming, classes and objects provide an interactive way of programming for user. Procedural programming confines the user to … Read more

C++ Functions Overloading

In C++ Functions Overloading, two or more than two functions can have same name with different number and/or type of parameters. For example, the names of the functions below are same but the number and type of arguments is different. This phenomenon is called function overloading. In the above example, the two functions having the … Read more

C++ References

C++ References refer to another variable. Reference variables act as reference to already existing variables. This means that a single variable can be called in two ways. One way is calling it by its own name and in second way calling by its reference variable. Create C++ Reference & operator is used to create reference … Read more

C++ Functions

C++ Function is a piece of code that performs specific tasks. Functions can run multiple times by calling them in code. They may or may not have a return value. Any C++ code must have at least one function. In C++ programming language functions provide code reusability. There are two types of functions in C++ … Read more