Skip to content

Tag Archives: cpp-class

match_results::cbegin() is an inbulit function in C++ STL which returns a constant iterator that points to the first match in the match_results object. This iterator… Read More
match_results::cbegin() is an inbulit function in C++ STL which returns a iterator that points to the first match in the match_results object. Syntax: smatch_name.begin() Parameters:… Read More
Given a line passing through two points A and B and an arbitrary point C in a 3-D plane, the task is to find the… Read More
Allocators are objects responsible for encapsulating memory management. std::allocator is used when you want to separate allocation and do construction in two steps. It is… Read More
A Vector Quantity is a Quantity which possesses both magnitude as well as direction. Here, magnitude is simply the amount or size of the quantity… Read More
Classes are data types. They are an expanded concept of structures, they can contain data members, but they can also contain functions as members whereas… Read More
Given a file “Input.txt” in which every line has values same as instance variables of a class. Read the values into the class’s object and do… Read More
Data abstraction is one of the most essential and important feature of object oriented programming in C++. Abstraction means displaying only essential information and hiding… Read More
In normal terms Encapsulation is defined as wrapping up of data and information under a single unit. In Object Oriented Programming, Encapsulation is defined as… Read More
Access modifiers are used to implement an important aspect of Object-Oriented Programming known as Data Hiding. Consider a real-life example: The Research and analysis wing (R&AW),… Read More
Class: A class in C++ is the building block, that leads to Object-Oriented programming. It is a user-defined data type, which holds its own data… Read More
Suppose we want to create a class for Graph. The class stores adjacency matrix representation of the graph. Therefore, our class structure would be something… Read More
TABLE OF CONTENT: Introduction Class Objects Encapsulation Abstraction Polymorphism Inheritance Dynamic Binding Message Passing Object-oriented programming – As the name suggests uses objects in programming.… Read More
Remain Careful from these two persons new friends and old enemies — Kabir What is static keyword in C++? static keyword can be applied to… Read More
In C++, a derived class object can be assigned to a base class object, but the other way is not possible. class Base { int… Read More