回复 10楼 九转星河
试试用enum bool{false,true};
代替#include<stdbool.h>那一行
bool AddItem(Item item, List * plist) { Node * pnew; Node * scan = *plist; pnew = (Node *)malloc(sizeof(Node)); if (pnew = NULL)//pnew == NULL 变量同常量对比,写成这样更好if( NULL == pnew ) return false;//失败时推出函数 CopyToNode(item,pnew); pnew->next = NULL; if (scan == NULL) //空列表,把pnew放在列表头部 * plist = pnew; else { while (scan->next != NULL) scan = scan->next; scan->next = pnew; //寻找尾节点,添加pnew指针 } return true; }