[Effective-cpp] Item 34: Understand How to Combine C++ and C in the Same Program.
Terje Slettebø
tslettebo at chello.no
Fri Jun 6 07:24:09 EDT 2003
>From: "Kloss, Burkhard" <Burkhard.Kloss at kbcfp.com>
> I'd say the rule is implied - after all, a favourite interview question is
"what is the difference between a struct and a class?" A: nothing, apart
from the default access specifier. Hence you'd expect classes to be laid
out the same way as structs, since they are the same thing.
>
> Of course, there's nothing stopping you adding virtual functions to a
struct, either, in which case all bets w.r.t. C compatibility are off
anyway.
Or virtual base classes. In short, anything with "virtual". :)
Regards,
Terje
More information about the Effective-cpp
mailing list