#include<stdio.h>
struct Book
{
char name[20];
short price;
};
int main()
{
struct Book pb={"高等数学",66元};
struct Book* a=&pb;
printf("a=%s\n",(*a).name);
printf("a=%s\n",(*a).price);
//printf("a=%s\n",a->name);
//printf("a=%s\n",a->price);
return 0;
}
欢迎大家留言,找出问题。