B
Ben Bacarisse
fir said:W dniu czwartek, 20 grudnia 2012 14:38:45 UTC+1 użytkownik Ben Bacarisse napisał:I think the OP wants an 'dead' edge all the way round. I.e. I think
they want:
int wider_tab[(N+2)*(N+2)];
int (*tab)[N+2] = (int (*)[N+2])&wider_tab[N+2+1];
(for N=500). You could also (probably) get away with using plain 2D
arrays for a little more clarity:
int wider_tab[N+2][N+2];
int (*tab)[N+2] = (void *)&wider_tab[1][1];
that is exactly what i want, but here above is it vector of pointers
or lite/solid block of addresable ram (with no other area pointers?),
(somewhat sad to say but i forgot of was atways somewhat out to array
pointer subtlities :/ like this)
Sorry, but I can't understand enough of the that to answer what seems to
be a question in it. I hazard a guess: What I wrote uses a pointer
into a single 2D array. There are no other pointers involved (it's not
an array of pointers.
what way "int (*tab)[N+2]" should be read?
tab is a pointer to an array of N+2 ints. http://www.bsb.me.uk/c-types