In this episode, I show you how to use access specifiers like public and private in the class definitions so that you can achieve data hiding. I also demonstrate the use of accessors and mutators(getters and setters) which are functions to access the hidden data indirectly. Finally, I also demonstrate the const keyword with function prototypes that serve as a promise to the C++ compiler that you won’t be modifying any data in the function implementation.

#c++ #cplusplus #programming-c

C++ Tutorial [39] - Access Specifiers | Accessors & Mutators
3.05 GEEK