Learn C++

Dynamic Initialization of Objects in C++

Dynamic initialization states that we are initializing the objects at the runtime. Since we use constructors to initialize everything, here we are going to use dynamic constructors. Here is an example of dynamic initialization: Output: This dynamic initialization can help us to create different constructors having the same function name but different parameters. If you …

Dynamic Initialization of Objects in C++ Read More »

C++ Nested for Loop

In any programming language loops play an important role in building our logic and successfully implementing it. In this article, we are going to see nested for loop in C++. Nested for loop means a for loop inside another for loop. Let’s see the syntax first and after that, we will some examples. Syntax: Here …

C++ Nested for Loop Read More »

this Pointer in C++

‘this’ is a reserved keyword in c++. It is used to get the variables or member functions present in the current class. ‘this’ pointer is not available for the friend functions because they are not members of class. It is given as an implicit argument to the member functions. Let’s see the code below to …

this Pointer in C++ Read More »