class ship
{
private:
static const int num1 = 5;
static const int num2 = 5;
protected:
virtual int getNum1(){
return num1;
}
int mainArray[getNum1()][num2];
}
basically I want to make a getter for a static const variable, this getter is later going to be used to initialize the array below it. how can i do this? (I am getting many errors with the current code above, it is just there to demonstrate my problem better). I want to be able to have a class that inherits from this class and change the size of the array using virtual getters. thanks in advance for any answers!