<lr******@ftml.net> schrieb im Newsbeitrag
news:11**********************@u72g2000cwu.googlegr oups.com...
I am relatively new to C++ so this is probably a basic question: Can I
overlay a class over a chuck of memory just like one can overlay a
struct over memory. I need to parse a frame comming from the network
hardware.
Only if your class looks like a classic struct. If you add "hidden"
varialbles to the class, e.g. a a pointer to the virtual function table do
to a virtual function in the class, ... it will mess up the memory
alignment.