 davePremium,MVM join:2000-05-04 not in ohio kudos:7 Reviews:
·Verizon FiOS
·Verizon Online DSL
| If you're talking about C, you can't. The dimensions of an array are part of its type. An array is a sequence of elements of the same type. Therefore you can't have an array of pointers to dfferent types.
You'd have to have an array of pointers-to-int, and then deal with the fact that each pointer-to-int is a really a pointer to an arrray of array of int, of some dimensions that have to be managed outside the type system.
Or you could write in C++, where you can define any type you want, as long as you're prepared to program it.
class Matrix { Matrix(int n, int m); ... };
std::vector<Matrix*> whatever;
|