Your question is unclear to me. But it seems that you are trying to call a non-static (i.e. normal) member function from a static member function. To call a non-static member function you need an object of this class to apply the function to. For example, when you call
then MyFunction is applied to the object that pObj points to. Inside MyFunction the
pointer then points to that very object.
The nice thing about a
pointer is that you address other member variables or member functions of a class without using a pointer. For example inside MyFunction to following two statements do the same:
this->m_counter = 0;
m_counter = 0;
or another example:
Now, static member functions are different in that they don't need and don't have this pointer. That means you can call them from outside your class although you don't have an object to apply the to.
Inside a static member function you cannot call a non-static member function of your class without explicitly telling the object you want to apply the function to, because your non-static member function has not this pointer.
If you want to call a non-static member from a static member function you must supply an object as a pointer or a reference:
MyClass* pOtherObj = ...