whereas classes are encapsulations of data and operations on that data, and are the basis of object orientation;
and classes have access control over member variables, whereas structs do not, and outside of structs you can access any variable inside the struct, whereas outside of classes you can't access private member variables in the class.
This is just the main point. A variable, while outside the class, you can not access the private member variables in the class
This is just the main points of difference, there are other differences, in short, the class is a higher
level encapsulation of the data than the structure, structure can do, class can do, and vice versa is not the case.