How to specify the size of a class array ?

PaulS:

The array size is fixed at compile time because I want to avoid new, delete, malloc and friends.

Why? It seems that either you should expect the user to specify a size, and make the array(s) that size, OR you should allow for dynamic sizing.

I want the user to be able to specify a size. At compile time. Dynamic allocation would mean grow the array as elements are add()ed. String is telling us that kind of functionality is not without problems :wink:

PaulS:
The free() function has some issues. You can avoid them by never calling it, or delete. That is, once an object is created, it persists until a reset is done.

That would bring in a third solution: let the user specify a size by passing a value to the constructor, which in turn would malloc() the array but never free() it. IOW, no destructor method.
This would be acceptable if the class was only used to declare global variables. In fact, I'd find using such kind of classes to declare local variables strange.