C ++ - 是一个数组的指针? [英] C++ - Is an array a pointer?
本文介绍了C ++ - 是一个数组的指针?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:结果
C:
是阵列
在 C ++
A 指针
?你能澄清这?
Is an array
in C++
a pointer
? Can you clarify this?
感谢。
推荐答案
数组名称本身没有任何指数是一个指针。
The array name itself without any index is a pointer.
int a[10];
printf("%d\n",*a); // will print first value
printf("%d\n",*(a+1) ); // will print second value
这篇关于C ++ - 是一个数组的指针?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文