Why can\'t I do something like this:
int size = menu.size; int list[size];
Is there anyway around this instead of using a vector? (arrays a
AFAIK In C++03, there are no variable-length-arrays (VLA):
you probably want to do this:
const int size = menu.size; int list[size]; // size is compile-time constant
or
int *list = new int[size]; // creates an array at runtime; delete[] list; // size can be non-const