Variable storage
Is there any right way to store a collection of variables inside a class?
The second is a little more complicated, but easily accessed in for loops.
1 2
|
private:
int var1, var2, var3, var4, var5, var6;
|
or
1 2 3
|
private:
enum variables { var1, var2, var3, var4, var5, var6 };
int variable_storage[var6+1];
|
Topic archived. No new replies allowed.