0
C++ Structures
Do you find C++ structures useful in any application? Or is it best to use classes?
1 Resposta
+ 1
Technically there is only one difference between classes and structs and that is that members are by default public in structs where as they are private by default in classes.
Practically i like to use structs to bundle/store/organize data.
For example i might have a book struct if i only intend to store data there.
Classes i use for actors and things that have methods/functionality. Like for example a player class for a game.