int (p)[10] --》指向含有10个整数的数组的指针*
1)typedef int (* arrT)[10]
2)using arrT = int (* )[10]
3)typedef int arrT[10]
using arrT = int[10] //定义数组别名
arrT* -->数组指针
int p[10] --》含有10个整型指针的数组*
1)typedef int *arrT[10]
2)using arrT = int *[10]
本文探讨了C/C++中typedef和using关键字在定义数组和数组指针类型上的区别,通过实例讲解了arrT作为数组别名的用法,包括arrT指向整数数组和整数指针数组的声明。
int (p)[10] --》指向含有10个整数的数组的指针*
1)typedef int (* arrT)[10]
2)using arrT = int (* )[10]
3)typedef int arrT[10]
using arrT = int[10] //定义数组别名
arrT* -->数组指针
int p[10] --》含有10个整型指针的数组*
1)typedef int *arrT[10]
2)using arrT = int *[10]
522
378
125

被折叠的 条评论
为什么被折叠?