I am wondering why this function is inaccessible.
The function:
class SERVER_DECL EventableObject
{
protected:
void RemoveEvent(TimedEvent * ev);
};
Here is what I have:
Event * ReadyUp;
void Start()
{
static uint8 Tick = 1;
if(Tick == 1)
{
NormalMessage("Starting Event..");
}
EventableObject.RemoveEvent(this->ReadyUp); // Inaccessible
}
EventableObject.RemoveEvent(this->BattlefieldReadyUp); // Inaccessible
Is where I'm getting the error.
It's inaccessible because it's protected instead of public.
protected means you can access it only from within the same, or a derived, class. Since you didn't indicate where your code was located, I'll just assume it is neither of those.
A protected function in a C++ can only be accessed by the class itself and derived classes, not outside the class, hence you're getting the error message that the function is inaccessible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With