T
t
Lippman's C++ Primer says that if a base class defines a static data
member or method, then there is only one such member for the
inheritance hierarchy rooted at the base class.
So no matter how many objects exist in the hierarchy, they all share
the same static members? How does this work? Do they all have method
pointers all pointing to the same set of static members?
Are static members created when a program is first run and placed in a
special section of memory? I am curious about how C++ implements
things, but I never studied comp sci beyond introductory classes.
member or method, then there is only one such member for the
inheritance hierarchy rooted at the base class.
So no matter how many objects exist in the hierarchy, they all share
the same static members? How does this work? Do they all have method
pointers all pointing to the same set of static members?
Are static members created when a program is first run and placed in a
special section of memory? I am curious about how C++ implements
things, but I never studied comp sci beyond introductory classes.