if you want the constructor to determine the size of the arrays, you can use a class template:
template<uint8_t N>
class MyClass {
private:
int* myArray;
size_t arrayLength;
public:
MyClass() {
arrayLength = N;
myArray = new int[arrayLength];
}
size_t getArrayLength (void) {
return arrayLength;
}
};
MyClass<10> myInstance;
void setup() {
Serial.begin(9600);
Serial.println(myInstance.getArrayLength());
}
void loop() {
// put your main code here, to run repeatedly:
}