创建链表时为什么结构体指针分配内存后无法访问内部的变量了呢?
typedef struct student {
char FirstName[100];
char LastName[100];
char SSN[15];
int courseat;
course cou[10];
student* next;
}student,*student;
struct student* creatlinklist() {
student* head = new student[];
head.next = NULL;
}
head是指针,应该写成:head->next = NULL;
course cou[10]; course 是什么类型?
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!