c++ - visual studio中,查看动态二维指针数组的值。
黄舟
黄舟 2017-04-17 13:34:52
0
1
504

double* p=new double[m];
for(int i=0;i<mi++){

p[i]=new double[n];

}
代码如上,我想查看整个二维数组的值。用vs自带的变量监视

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
大家讲道理

There is something wrong with your code.

According to your thinking, should it be written like this?

double** p = new double*[m];
for (int i = 0; i < m; i++){
    p[i] = new double[n];
}

Then use

in monitoring
p[1][2]

You can see the content this way.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!