I want to declare a variable size (not really variable size) array/vector inside a C++ class and I am encountering weird errors. I have tried to find a solution to this but cannot resolve the error. C++ gods, bless me.
class threeStack{
private:
int numberOfStacks = 3;
int sizeOfEachStack = 2;
int kc = 10;
vector <int> a(numberOfStacks * sizeOfEachStack);
vector <int> tops(numberOfStacks);
};
ERRORS
vector <int> a(numberOfStacks * sizeOfEachStack);
^~~~~~~~~~~~~~
main.cpp:10:27: error: ‘numberOfStacks’ is not a type
vector <int> tops(numberOfStacks);
^~~~~~~~~~~~~~