开发者

VS 2008 : See the elements referred to pointer

开发者 https://www.devze.com 2023-01-06 04:37 出处:网络
This seems to be a rather stupid question, but I create a pointer to an array of doubles : double* tab = new double[10];

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

精彩评论

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