This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
sizeof empty class
- From: ranjith kumar <ranjithproxy at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 8 Apr 2010 14:31:24 +0530
- Subject: 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.