- #1
- 4,652
- 38
I was trying to understand how structs differ from classes in c++ and I came across this:
http://carcino.gen.nz/tech/cpp/struct_vs_class.php
I was wondering.. when would you choose to use a struct in c++ rather than a class?
http://carcino.gen.nz/tech/cpp/struct_vs_class.php
The only difference between structs and classes in C++ is that the members of a struct have public visibility by default, and the members of a class have private visibility by default.
I was wondering.. when would you choose to use a struct in c++ rather than a class?
Last edited by a moderator: