> illegal call of non-static member function
Yes. That's because it's not static and you're trying to call the function without an object.
Make the function static - as I said in my last post and as the error is telling you - and it will work.
It's not enough for it to be public; it must be static as well.
This is because of the way the object oriented methodology works: if an object doesn't exist, then its methods don't exist either.