There's no simple answer to this. There are various things you could do, but which is right depends on what your code means. It's a design question, not a programming question.
You've already suggested various programming tricks you could do, like creating a Test
pointer (actually you don't need a Test
pointer, just a Test
object). I could suggest more tricks, for instance you could rewrite call()
so that it's not static, or (very nearly the same thing) you could pass a Test
pointer as a parameter of call()
and use that, or you could create a global Test
object and use that. None of these get to the heart of the problem. To answer your question you have to ask yourself questions like, why did I make call()
static in the first place, why does a static function need to call a non-static function.
If you can explain that, then it's easier to give more specific advice.