I have a problem. I need to dynamically allocate variable a, not in initialization but later in the program (i.e. based upon input data). Actually, I have 2-dimensional array the first dimension unknown, and I want to change just the first dimension (other dimensions are known in declaration). I heard this is possible but I don't know how.
So in the beginning I have the following:
int a[][5];
And somehow I need to get a[10][5];
..Or the problem in 3 dimensions:
I need to get a[15][10][5] from previous declaration of a[][10][5] (or ***a for that matter).
How to do that?
So in the beginning I have the following:
int a[][5];
And somehow I need to get a[10][5];
..Or the problem in 3 dimensions:
I need to get a[15][10][5] from previous declaration of a[][10][5] (or ***a for that matter).
How to do that?
Comment