3 ms·
I’m confused by this comment. How are private members part of the class interface? They are internal, not exposed to the outside, so how can they be part of the
by dimal 3y ago
I’m confused by this comment. How are private members part of the class interface? They are internal, not exposed to the outside, so how can they be part of the interface, which by definition is what the class exposes to the outside?
- kfajdsl 3y agoAt least in lower level languages like C or C++, private members are part of the interface since they affect how much memory needs to be allocated for an object.
- otikik 3y agoWell C++ had private, public and “friend” attributes. Classes that were “friends” could see and use their privates. I know it sounds bad. Not my fault