I have a C++ class (class1) with a static object of another class (class2) as a private member.
I know upon using the program I will have to initialize the static object, I can use a default constructor for this (undesired value).
Is it possible to initialize the static object to my desired value only once, and only if I create an object of the containing class (class1)?
Any help would be appreciated.