-
Notifications
You must be signed in to change notification settings - Fork 0
Public Private Protected
Delton Hughes edited this page Apr 29, 2023
·
1 revision
Definition: Public-property or method inside of this can be accessed anywhere. Private-property or method can only be accessed within the class. Protected- property or method can only be accessed within the class or by inherited/friended objects/methods.
Code Example:
class Shape {
protected/private:
public:
};
- Each term will have as follows: -> A definition on the term -> A code example some being in great detail if needed, for example a class example is going to be longer than a member variable. -> Lastly, a picture which in some way relates to the term but may also relate to other terms as well.