struct and class are identical in every way, except that when declaring methods and/or data members in a class, by default, they are treated as private members of the class. In a structure, by default, all methods and/or data are public.

Naturally, you can change the permission levels of methods and data members using the appropriate label of "public:", "protected:", or "private:".

Many s/w developers that program in C++ tend to use a class vs. a struct for modeling their objects. When only data members need to be encapsulated is a struct used. But that is just based on developer's preference.