Study
C++ · OOP: classes and constructors
Classes with public/private members, constructors with initialiser lists, const member functions, and destructors.
- private data plus public methods is how C++ enforces encapsulation, which Python only suggests with an underscore.
- Member initialiser lists set members before the constructor body runs.