This is my code. When I access dtr array in initImg function it gives a stack overflow exception. What might be the reason?
#define W 1000 #define H 1000 #de
You will eventually get to
dtr[W*W+j] = 0; <------here
Which is much more than you have allocated.