Inheritance issue on MetaEditor Version 5.00 build 1966

 

Hello,

I have an issue on using inheritance i can't access public variables and functions from the parent class here is a simple scenario.

class A {
   public: 
      int iProp1;
};

class B : A{
   public:
      int iProp2;
};

B b;
int OnInit() {
   b.iProp1 = 0;
   return(INIT_SUCCEEDED);
}



 
Marouane Majid:

Hello,

I have an issue on using inheritance i can't access public variables and functions from the parent class here is a simple scenario.



Inheritance is private by default. You need to declare it public explicitly.
 
Oh my bad, you're right thanks !