public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* sizeof empty class
@ 2010-04-08  9:01 ranjith kumar
  2010-04-08 11:20 ` John (Eljay) Love-Jensen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ranjith kumar @ 2010-04-08  9:01 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-09  5:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08  9:01 sizeof empty class ranjith kumar
2010-04-08 11:20 ` John (Eljay) Love-Jensen
2010-04-09  3:38 ` leon zadorin
2010-04-09  5:03 ` me22

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).