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
The difference between class
and struct
is a difference between keywords, not between data types. This two
struct foo : foo_base { int x;};
class bar : bar_base { int x; };
both define a class type. The difference of the keywords in this context is the different default access:
foo::x
is public and foo_base
is inherited publiclybar::x
is private and bar_base
is inherited privately