void ReverseList(CList plist) { assert(plist != NULL); if (plist == NULL) { return; } CNode* p, * q; p = plist->next; plist->next = NULL; q = p->next; while (p != NULL) { q = p->next; p->next = plist->next; plist->next = p; p = q; } }
京公网安备 11010502049817号