Concept behind Inline Functions and uses

The concept behind an inline functions is to replace each call of that function with its…

Constant Variables : understanding the concept

The compiler keeps the constant variables value of built-in types in symbol table, however, in case…

Why exception in destructor is a bad idea?

exception in destructor are dangerous. Firstly the exception here may cause the abnormal termination of C++…

How to stop copy of object?

To stop copy of object, the class need to hide both copy constructor and the assignment…

Destructor – Compiler Generated : always non-virtual

destructor, Compiler will never generate a virtual destructor because compiler cannot decide if class is there…

Parametrized constructor: understanding the concept

Parametrized constructor is a user-defined constructor which takes some parameter as argument and constructs. If a…

Which member functions are generated by compiler in class?

These member functions are generated only if needed, i.e., if a copy operation is needed then…

Diamond problem in inheritance – Overheads

Diamond problem in inheritance is a consequence of multiple inheritance which leads to duplication of data.…

Multiple inheritance & virtual base classes

In multiple inheritance, one way to solve this ambiguity problem is to use virtual base classes,…

new and delete: Understanding array version

To allocate objects in array, program need to use an overloaded form of new & delete.…

Overloading new and delete in global scope

Overloading new and delete, The overloaded new must take an argument of size_t (i.e., number of…

Overload new & delete operator in a class

overload new & delete: We can control the creation & destruction of objects and arrays of…