Friday, December 3, 2010

Class Size

class IA {public: int i;}; is 4 bytes on Solaris.

This is an example of POD (Plain Old Data). There is nothing funny added to the structure. It is compatible with C. It can be sent across the wires between machines without worrying about

vptrs. You may still have to worry about endian, alignment, and padding though.

No comments:

Post a Comment