vendredi 24 novembre 2017

where are the common member variables stored when defining a class?

I define a simple class:

class A
{
public:
    int a;
};

the sizeof(A) is 4, so I am confused that where the common member variable a is stored when I just define such a class? stack or heap?

Aucun commentaire:

Enregistrer un commentaire