Rick C. Hodgin
unread,Mar 13, 2017, 12:05:01 PM3/13/17You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Does C++ offer a static constructor? Something that can be called at
startup to initialize anything specific to static members of a class?
Something like:
class xyz
{
public:
xyz(); // Called for each instance
~xyz(); // Called for each instance
static xyz(); // Called at startup
static ~xyz(); // Called at normal shutdown
}
Or do I need to define my own separate un-encapsulated function
somewhere which then initializes any values I might need for the
class before it's used the first time, so as to not take the test-
on-each-instantiation/deinstantiation performance hit?
Thank you,
Rick C. Hodgin