Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
Misc
8.8K+ articles
C++
4.3K+ articles
C++ Programs
2.4K+ articles
C Language
1.8K+ articles
cpp-class
57+ articles
cpp-constructor
37+ articles
cpp-inheritance
28+ articles
cpp-virtual
17+ articles
Constructors
14+ articles
CPP-OOPs
167+ posts
Recent Articles
Popular Articles
How to Overload the (+) Plus Operator in C++?
Last Updated: 14 February 2024
In C++, operator overloading is a feature of the OOPs concept that allows you to redefine the behavior for different operators when they are used with objects of user-defi...
read more
C++ Programs
C++
Picked
cpp-operator
CPP-OOPs
CPP Examples
How to Define a Static Data Member of Type const std::string?
Last Updated: 27 February 2024
In C++, static data members are members that exist independently of any object of the class. A static data member is shared by all objects of the class, meaning there is o...
read more
C++ Programs
C++
Picked
cpp-data-types
cpp-string
C++-Class and Object
CPP-OOPs
CPP Examples
How to Overload the Arrow Operator (->) in C++?
Last Updated: 27 February 2024
C++ has the ability to redefine the function of operators for the objects of some class. This is called operator overloading. In this article, we will learn how to overloa...
read more
C++ Programs
C++
Picked
cpp-operator
cpp-operator-overloading
CPP-OOPs
CPP Examples
How to Declare a Static Member Function in a Class in C++?
Last Updated: 27 February 2024
In C++, static functions are functions that are directly associated with a class so we can access the static function directly without creating an object of the class usin...
read more
C++ Programs
C++
Picked
cpp-class
C++-Class and Object
C++-Static Keyword
CPP-OOPs
CPP Examples
How to Implement a Copy Constructor for Deep Copying?
Last Updated: 27 March 2024
In C++, the copy constructor enables us to initialize an object using another object of the same class. In this article, we will learn, how to implement a copy constructor...
read more
C++ Programs
C++
Picked
cpp-class
cpp-constructor
C++-Constructors
CPP-OOPs
CPP Examples
How to Override a Base Class Method in C++?
Last Updated: 13 March 2024
In C++, method overriding allows us to redefine a function from a parent class (base class) in its child class (derived class) to modify its behavior for objects of the ch...
read more
C++ Programs
C++
Picked
C++-Virtual Functions
CPP-OOPs
CPP Examples
How to Implement a Copy Constructor in a Derived Class in C++
Last Updated: 27 March 2024
In object-oriented programming, a copy constructor is a special member function that initializes a new object as a copy of an existing object. In this article, we will lea...
read more
C++ Programs
C++
Picked
cpp-class
C++-Constructors
C++-Class and Object
CPP-OOPs
CPP Examples
How to Remove an Element from Array in C++?
Last Updated: 11 October 2024
In C++, removing an element from an array is tricky because we cannot modify the memory space occupied by the array. So, we pseudo delete the element by moving it to the e...
read more
C++ Programs
C++
Picked
STL
cpp-array
cpp-algorithm-library
CPP-OOPs
CPP Examples
Different Ways of Operator Overloading in C++
Last Updated: 09 May 2024
In C++, operator overloading is the concept that allows us to redefine the behavior of the already existing operator for our class. C++ provides a special function called ...
read more
C++
cpp-overloading
CPP-OOPs
How to Call a Virtual Function From a Derived Class in C++?
Last Updated: 30 April 2024
In C++, virtual functions play an important role because they allow the users to perform run-time polymorphism. While dealing with inheritance and virtual functions, it is...
read more
C++ Programs
C++
Picked
CPP-OOPs
CPP Examples
C++ Getters and Setters
Last Updated: 27 May 2024
In C++, getters and setters are part of data encapsulation used to protect our data, particularly when creating classes. These are public methods that are used to access a...
read more
C++ Programs
C++
Picked
cpp-class
CPP-OOPs
CPP Examples
Function Pointer to Member Function in C++
Last Updated: 28 May 2024
In C++, function pointers enable users to treat functions as objects. They provide a way to pass functions as arguments to other functions. A function pointer to a member ...
read more
C++ Programs
C++
Picked
Misc C++
CPP-OOPs
CPP Examples
misc-cpp
Diamond Problem in C++
Last Updated: 12 August 2024
C++ is one of the most powerful object-oriented programming language. However, with great power comes great responsibility, especially when dealing with complex inheritanc...
read more
C++
C++-Virtual Functions
C++ Errors
CPP-OOPs
Parameterized Constructor in C++
Last Updated: 09 December 2024
In C++, parameterized constructor is a type of constructor that can accept arguments. Parameterized Constructors make it possible to pass arguments to initialize an object...
read more
C++
cpp-class
cpp-constructor
CPP-OOPs
Importance of Constructors in C++
Last Updated: 17 July 2024
Constructors are special member functions in C++ that are invoked automatically when an object of a class is created. Their primary role is to initialize objects. In this ...
read more
C++
cpp-class
cpp-constructor
CPP-OOPs
1
2
3
4
...
12
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !