March 2018
Intermediate to advanced
183 pages
2h 34m
English
A struct in C++ is equivalent to a class, except that members of a struct default to public access, instead of private access as in classes. By convention, structs are used instead of classes to represent simple data structures that mainly contain public fields.
To declare objects of a struct, you use the normal declaration syntax .
Another alternative syntax often used with structs is to declare the objects when the struct is defined by placing ...