Stack overflow C++

前端 未结 8 2015
时光说笑
时光说笑 2020-12-02 00:06

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         


        
8条回答
  •  渐次进展
    2020-12-02 00:50

    You will eventually get to

    dtr[W*W+j] = 0;   <------here
    

    Which is much more than you have allocated.

提交回复
热议问题