member in static method

Hi @all,

another Question:

Theres a class named "A" which has got a static function named "sfA".

Now I instance an object of class A and call a method from A called "fA".

The method fA calls sfA. And now the issue is: i need the value of a member from the object which called fA respectivly sfA, inside sfA.

Is there a smarter way to get the value of the member as to declare an new parameter for the sfA? sfA has to be static.

Thx for your Time.
This might not be what you are looking for but: you could pass a pointer of your object to your static function. It could be seen as the same as passing an extra parameter,but if you need multiple members this would work perfectly.
Yes, it is a better idea than mine :) but not exactly what i search for.
Well AFAIK you will never be able to access non-static members from a static function any other way, by definition.
Why do you make it static if it needs to access member variables?
Topic archived. No new replies allowed.