Actually THERE IS a difference between the two cases! This difference has meanin rarely, usually in case of structs, but a class is the same as a struct and the only difference is that the declarations inside the body of a struct start with public while they start as private inside a class.
The difference is that your class without virtual functions and an explicitly defined constructor/destructor is a
POD[
^]!
Sometimes you can use only PODs, for example:
class CC
{
public:
char c;
};
struct SS
{
int i;
};
union UU
{
CC c;
SS s;
};
Uncomment something in CC and the code no longer compiles because you can put only POD types in a union!
EDIT: bugfix
EDIT: Just found out that this solution doesn't exactly the answer to the question, but points out a difference, maybe the only one (who knows it in case of C++... :D).