Posts by Joao Paulo Reis • 11 points
1 post
-
1
votes3
answers138
viewsA: In structures (struct) is it necessary to use getters and setters or only in classes (class)?
The use of getters and setters is neither necessary nor obligatory in either case, but as you mentioned are good practices that help both in the question of encapsulation, and in facilitating the…