This question was already asked in the context of C#/.Net.
Now I\'d like to learn the differences between a struct and a class in C++. Please discuss the technical d
One other thing to note, if you updated a legacy app that had structs to use classes you might run into the following issue:
Old code has structs, code was cleaned up and these changed to classes. A virtual function or two was then added to the new updated class.
When virtual functions are in classes then internally the compiler will add extra pointer to the class data to point to the functions.
How this would break old legacy code is if in the old code somewhere the struct was cleared using memfill to clear it all to zeros, this would stomp the extra pointer data as well.