| Niels Meijer (22) | |||
I'm writing a program in which I have to use a matrix to represent a file in code. because it's a file, the size of the matrix is undefined, and therefore the matrix has to be dynamic. I found out that my compiler doesn't like dynamic multidimensional arrays, so I was thinking of this matrix as a dynamic (monodimensional) array of other dynamic (monodimensional) arrays. My program (and thus this example) uses unsigned chars.
my question is: how do I put variable in the first place in the first array of matrix? matrix[rowNumber]->[columnNumber]=variable;doesn't seem to work, *(matrix[rowNumber])[columnNumber]neither... Please help! Kind regards, Niels Meijer | |||
|
|
|||
| TTT (52) | |||
Use matrix like 2 dimensional array
| |||
|
|
|||
| Niels Meijer (22) | |
|
Aaah! I didn't try that one! Thanks man! It actually really makes sense if you trace back the meaning of all the operators, it's so stupid I didn't try that... | |
|
|
|