This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sizeof empty class


Hi,

1) What is the size of an an empty class? On my machine it is showing
1. What is stored at that 1 byte memory?
2) will sizeof() function ever return zero?
3)How constructor/destructor are called when an object is created?
   Any hidden virables will be crerated by the compiler inside the class?
4) Why destructor of derived class is not called when we delete a
baseclass pointer which is pointing to derived class?

Thansk in advance.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]