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

前端 未结 4 1415
别跟我提以往
别跟我提以往 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 01:01

    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.

提交回复
热议问题