Can I access a base classes protected members from a static function in a derived class?
问题 I have a program where I need to make a base class which is shared between a dll and some application code. Then I have two different derived classes, one in the dll one in the main application. Each of these have some static member functions which operate on the data in the nase class. (They need to be static as are used as function pointers elsewhere). In its simplest form my issue is shown below. class Base { protected: int var ; }; class Derived : public Base { static bool Process( Base