Stack overflow C++

前端 未结 8 2023
时光说笑
时光说笑 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:29

    Your compiler will define the stack size. A way to get around this is to dynamically allocate your arrays using std::vector array_one(W*H).

提交回复
热议问题