Possible Duplicate:
C++ multi dimensional array
I'm trying to create a class that creates an arbitrary sized array of strings based on one of the objects constructor arguments.
Here, the code for the object constructor I'm trying so far:
commandSpec::commandSpec(int numberOfCommands)
{
std::string * commands = new std::string[3][numberOfCommands];
}
I get an error: 'numberOfCommands cannot appear in a constant expression', could someone show me the correct way to specify an array in an object that i dont know the size of until execution.
Thanks, j