G
Google Poster
Coming from the C world, I was trilled when I realized that it is
possible to create an array with dimensions, at run time:
string MyTable[ver_dim][hor_dim];
But alas, it seems it was too good to be true. It is clear that C
requires the dimensions to be known at compile time for a reason.
I cannot pass the dynamically created array to functions. I have tried
to code without classes and then with classes:
ExpressionTable::ExpressionTable(int nofRows, int nofCols)
{// initializer
string table[nofRows][nofCols];
}
The above array is created, but I cannot access it. The unknown (at
compile time) dimensions are a big block.
Your expert suggestions are most appreciated...
-Ramon
possible to create an array with dimensions, at run time:
string MyTable[ver_dim][hor_dim];
But alas, it seems it was too good to be true. It is clear that C
requires the dimensions to be known at compile time for a reason.
I cannot pass the dynamically created array to functions. I have tried
to code without classes and then with classes:
ExpressionTable::ExpressionTable(int nofRows, int nofCols)
{// initializer
string table[nofRows][nofCols];
}
The above array is created, but I cannot access it. The unknown (at
compile time) dimensions are a big block.
Your expert suggestions are most appreciated...
-Ramon