p=new people;在C++中,定义一个类people,才可以用new运算符来生成一个对象struct结构体不行的,改为:struct people{ int num; people *next;}; struct people * create(int n){ struct people *p1,*p2
以注释的形式解释了每行代码,希望可以帮助你;struct node //链表的结构体,{ int data;//data用于存放链表节点的数据 node *next;//next用于存储下一个链表节点,以此形成链表的链};node *creatlist(int n);//函数的前向生命,此函数功能是用于创建列表的int mai