Is there a way to keep specifying member variables in this fashion without specifying a definite number of possible variables?Code:struct intArray(int size)
{
switch (size)
{
case 1: { int a0; break; }
case 2: { int a0, a1; break;}
case 3: { int a0, a1, a2; break; }
}
};
For example, when size is 250 I want 250 variables (a0 - a249).
I realize this looks like a simple array of integers, but for my purposes an array won't work.