vendredi 17 septembre 2021

C++: Why instance member of a class been allocated storage when the instance of the class is not created yet

consider the following:

class Bar {
public:
    // ...
private:
    int x=4; --> Tag A
}

Why Tag A has storage allocated (definition) when no instance of class Bar is created yet?

Aucun commentaire:

Enregistrer un commentaire