Constructors and Destructors in C++

Constructors in c++.

Constructor is a special member function which is having same name as classname which is used to automatically initialze data members to some values when an object of the class is created.A constructor could be invoked directly when  an object of the class is created. There is no need to call constructor explicitly.

Before starting constructors in detail, lets   discuss a short example.

Read moreConstructors and Destructors in C++

Focusing on strings in C++ and Operation on strings

Focusing on strings in C++.

Declaring and Initializing Different type of Strings:

Focus:String is nothing but just a sequence/Array  of characters,like “hello !! hope you are good well”.Basically C++ includes concepts of both C and C++ also.

Read moreFocusing on strings in C++ and Operation on strings

Core c++ concepts of Pointers

Pointer to  Function.

As we use pointer to carry address of variable,also we discussed  pointer to array ,where we assigned pointer to array(pointer pointing to first address of array), similarly pointer can also be used to point to  function by carrying address of the function it points.

Declaration of Function Pointer


data_type(*ptr_name)(arg_list)


data type: data type /return type of member function.

*ptr name: name of the pointer which is pointing to function.

arg_list: List of arguments that function is having.

Read moreCore c++ concepts of Pointers