c/c++编程
JACKY88888889
这个作者很懒,什么都没留下…
展开
-
对数组指针的理解(2)
有些事情总是越想越糊涂,或者觉得想明白了,但是仔细一想又觉得不对,很郁闷!不知道大家是否有同感? /*正确的/ char num[4] = {0x12,0x34,0x56,0x78};//1 char (*p)[4] = # //2 Char *ptr=&num[0]; //3 char *ptr1 = num; //4 /*错误的/ //char(*p)[4] = num;//错原创 2020-05-31 17:32:00 · 114 阅读 · 0 评论 -
关于数组指针的理解(1)
代码如下: #include “stdafx.h” #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int num[5]={1,2,3,4,5}; int (*p)[5]=#//定义一个函数指针 printf("%x\n",p); printf("%x\n",*p); //为什么p和*p一样的值...原创 2019-11-09 16:36:56 · 111 阅读 · 0 评论