mardi 18 décembre 2018

How default constructor knows where to initialize the default values of the data member in memory

From book "The first hidden argument to the constructor is the this pointer" Now when we write like

classname object;

Is it like first memory for the object is created and address of the object is pass to default constructor so that it can initializes the values of the class.

If this is the concept for object how memory is created, is it created by the OS ?

Aucun commentaire:

Enregistrer un commentaire