How to see all elements of a two dimensional array in Visual Studio 2010?

前端 未结 4 670
长情又很酷
长情又很酷 2021-02-19 00:04

I\'m debugging my c++ code in Visual Studio 2010 and want to see the content of my array, say Q, which is 17x17. When I insert a breakpoint and try to debug, I see only the vari

4条回答
  •  不知归路
    2021-02-19 00:52

    Put the array Q to global scope and you can see all it's elements(if it is local array you can copy to a global array and manipulate on global array):

    int Q[17][17];
    int main(){
        int x=1, y=1, z;
    }
    

    After debuging and the algorithm are well verified, you can use the local array as you want

提交回复
热议问题