can i acces dynamicallty allocated matrix in C like that a i means and how to do this if i can ??
Posted on 2003-12-18 12:45:11 by AceEmbler
you can manipulate like a 'one dimension' array.

eg.

int *i, list[10];
i = list;
and acces i; instead of *(i+j);


For access like a 2 dimensaion array can be (using the one dimension thing:



I put now that the first is a column and the second is a row, k[5][2] 5 columns 2 rows ( think is how C manipulate it?)


int *x, dlist[10][5]; // MAX_COLS=10 MAX_ROWS = 5

x= dlist;
for acces element x

for acces dlist[3][2];

x
x[10*3+2] = 32

0 <= col < MAX_COLS
0 <= row < MAX_ROWS

Nice day or night.
Posted on 2003-12-19 14:05:05 by rea