小编D.K*_*ngh的帖子

C++中的多维数组,对我来说是一个谜:(

我在理解多维数组时遇到了很多问题.让一个数组

x[2]; // now x is constant pointer to first element i.e x's name is address of x[0]
Run Code Online (Sandbox Code Playgroud)

现在二维数组:

x[2][5]; // here x is address of x[0] which contains the address of first element of array x[][0];
Run Code Online (Sandbox Code Playgroud)

现在是指针

int(*y)[5]; 
Run Code Online (Sandbox Code Playgroud)

是指向整数数组5的指针.怎么写y = x

现在我在VS中做了一些实用的理解,这是在这里,我的主要问题在于图像:

http://img184.imagevenue.com/img.php?image=96382_first_122_1120lo.jpg

请从概念上回答问题; C++如何存储多维数组等

我会非常感谢任何帮助:)

c++ arrays multidimensional-array

5
推荐指数
2
解决办法
3416
查看次数

标签 统计

arrays ×1

c++ ×1

multidimensional-array ×1