Wednesday, July 13, 2011

Does a two-dimensional array have multiple length fields?

If you mean that the "width" and "height" of the 2-D array can be different values, yes. But if you mean that you can have varying length in either of those fields, I don't think it's possible. It may be best to simply allocate memory for the maximum length of whichever dimension is "variable"

No comments:

Post a Comment