F
fir
Can I use c arrays in such way tab[-1] or tab[-1][-1] (I mean when index is below zero)?
Also - I think if try to use some way of optimization
where instead of checking some edge values like
if(x>=0 && x<500 && y>=0 && y<500)
tab[y][x] = 1;
alloc some edge ram and do not bother about x=-1 or x=tab_max_x+1
but here it would be convenient to cast some pointer ot type tab[500][500] 'into' wider_tab[502][502]
in such way that tab[0][0] wolul correspond to wider_tab[1][1] (and tab[-1][-1] to wider_tab[0][0])
Can I get something like that? (If not I am sad)
Also - I think if try to use some way of optimization
where instead of checking some edge values like
if(x>=0 && x<500 && y>=0 && y<500)
tab[y][x] = 1;
alloc some edge ram and do not bother about x=-1 or x=tab_max_x+1
but here it would be convenient to cast some pointer ot type tab[500][500] 'into' wider_tab[502][502]
in such way that tab[0][0] wolul correspond to wider_tab[1][1] (and tab[-1][-1] to wider_tab[0][0])
Can I get something like that? (If not I am sad)