作者在 2011-10-10 21:32:02 发布以下内容
#include <stdio.h>
#include <malloc.h>
typedef struct _type
{
int a;
char b;
} Type;
int main()
{
int *p=NULL;
Type q;
q.a = 7;
printf("q=%d\n",q.a);
printf("q.a point=%x\n",&q.a);
p=&(q.a);
printf("p=%x\n",p);
printf("p=%x\n",&p);
printf("p=%d\n",*p);
return 0;
}
#include <malloc.h>
typedef struct _type
{
int a;
char b;
} Type;
int main()
{
int *p=NULL;
Type q;
q.a = 7;
printf("q=%d\n",q.a);
printf("q.a point=%x\n",&q.a);
p=&(q.a);
printf("p=%x\n",p);
printf("p=%x\n",&p);
printf("p=%d\n",*p);
return 0;
}