结构体问题
#include<stdio.h>#include<malloc.h>
struct P
{
int x,y;
};
typedef struct PO
{
struct P * s;
struct PO *next;
}LinkP;
void main()
{
LinkP * A ;
A=(LinkP *)malloc(sizeof(LinkP));
A->s->x=2;
A->s->y=3;
A->next=NULL;
printf("<%d,%d>\n",A->s->x,A->s->y);
}
为什么运行时会出现错误呢?