Virtual table/Virtual function in C++

Note that those functions not carrying the keyword virtual in their declaration do not generally appear in the virtual method table. Whenever a class itself contains virtual functions or overrides virtual functions from a parent class the compiler builds a vtable for that class. The Virtual table contains the array…

Copy Constructor

A copy constructor is called when an object is passed by value. Copy constructor itself is a function. So if we pass argument by value in a copy constructor, a call to copy constructor would be made to call copy constructor which becomes a non-terminating chain of calls. Therefore compiler…