Inheritance issue on MetaEditor Version 5.00 build 1966

To add comments, please log in or register
Marouane Majid
1612
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.

class A {
   public: 
      int iProp1;
};

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

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



Alain Verleyen
38674
Alain Verleyen  
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.
Marouane Majid
1612
Marouane Majid  
Oh my bad, you're right thanks !
To add comments, please log in or register