开发者

VS 2008 : See the elements referred to pointer

This seems to be a rather stupid question, but I create a pointer to an array of doubles :

double* tab = new double[10];

Then I fill the double array, but when I expand the tab pointer in Debug Mode, I only *tab which gives me the value of first element, which is normal. But how do I see the开发者_如何学C other elements?

thanks


If you write in the watch window tab,10 you'll see it as if its a 10 element array.

Be careful though because this can also show you stuff beyond the allocated length of the array.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜