This is the example from Effective modern c++.
class Widget { … private: int x{ 0 }; // fine, x's default value is 0 int y = 0; // also fine int z(0); // error!
};
Aucun commentaire:
Enregistrer un commentaire