In what scenarios is it better to use a struct vs a class in C++?
struct
class
Structs by default have public access and classes by default have private access.
Personally I use structs for Data Transfer Objects or as Value Objects. When used as such I declare all members as const to prevent modification by other code.