
Accessing a C++ Object in C Code
C code, which of course is unaware of object semantics, can access the data members of a C++ object directly, but certain requirements must be met. There are some guarantees about the underlying memory layout of an object. C code can take advantage of these guarantees and treat a C++