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

前端 未结 4 1412
别跟我提以往
别跟我提以往 2021-02-19 00:10

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:49

    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

提交回复
热议问题