I want to be able to initialise the static member scalingfactor
in the following class:
class ScalingRect: public Rect
{
public:
static float scalingfactor;
...
};
I thought I'd initialise it using a static member function of another class like this in the .cpp
float ScalingRect::Rect = Engine::GetScaleFactor();
However, I don't want to call GetScaleFactor()
before the Engine
class is ready. How can I ensure it gets called at the right time?