问题描述
我正在Visual Studio 2010中调试我的c ++代码,并希望看到我的数组的内容,Q是17x17。当我插入一个断点并尝试调试时,我只看到变量Q。当我把它带到监视屏幕并将其重命名为Q,17时,我看到一个级别。但是我想看到另一个维度,太。我不能写Q,17,17。什么是正确的命令?
谢谢...
你不能,至少不是直接。
你可以做的是把& array [0] [0]
,然后调整它的大小,所以列数匹配一行数组
数据。
或者,您可以在观察窗口中放置 array [0],17
,然后重复 array [1],17
等。
不是你正在寻找的答案,但手表窗口虽然很强大,只是不能做你想要的。
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 variable "Q". When I take it to the "Watch" screen and rename it to "Q,17", I see one level down.
But I want to see the other dimension,too. I can't write "Q,17,17". What is the proper command?
Thank you...
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.
这篇关于如何在Visual Studio 2010中查看二维数组的所有元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!