c - Max size of pointer array to 2D array? -
i'm using following allow me choose 2d array use, dynamically.
const prog_uint16_t (*p)[8]; p = arrayname;
this works fine 2d array of size [3][8], require [10][1025].
when try this:
const prog_uint16_t (*p)[1025]; p = arrayname;
i "cannot convert" error.
any ideas? thanks!
edit:
here's declaration of 2d array works. 1 doesn't declared same way, different number of entries ([10][1025]).
const prog_uint16_t tri[3][8]={{10,20,30,40,50,60,70,80},{11,21,31,41,51,61,71,81},{12,22,32,42,52,62,72,82}};
thanks!
you cant change size , type of constant pointer of course can change data pointed or
else cant resize type ofp pointer
look code maybe you
const int x; // x cannot modified const int* px = &x; // px address of const int // , can't used change int *px = 4; // illegal - can't use px change int int* pint; // address of normal int pint = px; // illegal - cannot convert const int* int*
be successfull
Comments
Post a Comment