指针
int var=20;
int *p;
p=&var;
printf("%p\n",p);//p表示地址
printf("%d\n",*p)//*p表示指针访问值
结构体
申明:(可在其他文件或头文件中)
struct Books
{
char title[50];
char author[50];
char subject[100];
int book_id;
};
定义:
struct Books Book1;
Book1.book_id = 6495407;
结构体指针
struct Books *struct_pointer;
struct_pointer = &Book1;
struct_pointer->title;