Want some information about Class Size
-
Hi All,, I want some information about size of class. I have tested one example like below...
class A { };
I declared one class but there is no any params into this.But when I see its size using sizeof() fuction it shows 1 .So I want to know for what it stores one byte. Thanks in Advance.Ashish Bhatt
-
Hi All,, I want some information about size of class. I have tested one example like below...
class A { };
I declared one class but there is no any params into this.But when I see its size using sizeof() fuction it shows 1 .So I want to know for what it stores one byte. Thanks in Advance.Ashish Bhatt
See:
- http://groups.google.com/group/comp.lang.c++/browse_thread/thread/e16cb3f5c28d332a/cd46514ff8840fc8?hl=en&lnk=st&q=empty+class+1+byte+ranju#cd46514ff8840fc8[^]
- http://groups.google.com/groups?sourceid=ie7&rls=com.microsoft:en&ie=UTF-8&oe=utf8&q=empty+class+size+1+byte&um=1&sa=N&tab=wg[^]
-- gleat http://blogorama.nerdworks.in[^] --
-
Hi All,, I want some information about size of class. I have tested one example like below...
class A { };
I declared one class but there is no any params into this.But when I see its size using sizeof() fuction it shows 1 .So I want to know for what it stores one byte. Thanks in Advance.Ashish Bhatt
or from the man himself: Bjarne Stroustrup: Why is the size of an empty class not zero?[^]
Mark Salsbery Microsoft MVP - Visual C++ :java: