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

前端 未结 4 676
长情又很酷
长情又很酷 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条回答
  •  -上瘾入骨i
    2021-02-19 00:56

    You can't, at least not directly.

    What you can do is put &array[0][0] in the memory window, and then resize it so the number of columns matches one row of array data.

    Alternatively, you can put array[0],17 in the watch window, and then repeat it for array[1],17, etc.

    Not the answer you were looking for perhaps, but the watch window, while pretty powerful, just can't do what you want.

提交回复
热议问题