为什么左边是指针右边是malloc不能匹配

日期:2016-11-11 18:54:50 人气:1

为什么左边是指针右边是malloc不能匹配

struct Student* pNew, pEnd; pNew=pEnd = (struct Student*)malloc(sizeof(struct Student)); 你的pEnd并不是指针类型啊,应该改成: struct Student* pNew, *pEnd;要么就改成下面的形式: typedef struct Student* pStudent;pStudent pNew,pEnd;pNew=pEnd = (struct Student*)malloc(sizeof(struct
    A+
热门评论