Size of empty class
std::cout << sizeof ( foo ) << std::endl;
return ( 0 );
produces this result:
Why is the size of an instance of Foo 1, although it doesn't have any member variables?
Objects have identity; each object must have a unique address in memory.
For instance, these eleven objects must be distinguishable from each other:
Foo bar ;
Foo baz ;
Last edited on
Ah, that makes sense. Thanks!
Topic archived. No new replies allowed.