I know how to access static member variable in static member method - these are two ways I usually use (very simplified):
class S{
private:
static const int testValue = 5;
public:
static int getTestValue0(){
return testValue;
}
static int getTestValue1(){
return S::testValue;
}
};
( working example on : http://ideone.com/VHCSbh )
My question is: is there any more explicit way how to access static member variable than ClassName::staticMemberVar
?
Is there something like self::
in C++ ?
...simply I am looking for something like this
for referencing static members.