#include <stdio.h>
#include <stdlib.h>
struct dangdang
{
char email[];
char name[];
char addr[];
int num;
int bugnum;
char tel[];
char phone[];
double RMB;
}dbdd[]={{"1171546435@qq.com","lj","重庆市",,,"","",},
{"453454534@qq.com","fd","贵阳",,,"","",}
};
//访问数组
void main3()
{
int a[]={,,,,};
int *p;
for(p=a;p>a+;p++)//p++根据类型增加 一次增加四个字节
{
printf("%d%x",*p,p);
}
}
void main4()
{
struct dangdang *p;
for(p=dbdd;p<dbdd+;p++)
{
//两种方式
printf("\nname=%s,addr=%s,phone=%s",p->name,p->addr,p->phone);
printf("\nname=%s,addr=%s,phone=%s",(*p).name,(*p).addr,(*p).phone);
}
getchar();
}