voidList::dxu(Node*head)//倒叙排列一个链表{按数据结构结点链表类来做的}{Node*p,pnow,q;p=head->next;if(p==NULL)return;pnow=NULL;while(p->next){q=p->next;p->next=pnow;pnow=p...
void List:: dxu(Node * head)//倒叙排列一个链表{按 数据结构 结点链表类来做的}
{
Node *p,pnow,q;
p=head->next;
if(p==NULL) return;
pnow = NULL;
while(p->next)
{
q=p->next;
p->next=pnow;
pnow=p;
p=q;
}
p->next=pnow;
head->next=p;
}
vc++提示:
:\Program Files\Microsoft Visual Studio\MyProjects\text3\b.cpp(106) : error C2511: '=' : overloaded member function 'void (class Node &,const class Node &)' not found in 'List'
c:\program files\microsoft visual studio\myprojects\text3\a.h(21) : see declaration of 'List'
C:\Program Files\Microsoft Visual Studio\MyProjects\text3\b.cpp(122) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class Node *' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio\MyProjects\text3\b.cpp(123) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class Node' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio\MyProjects\text3\b.cpp(124) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class Node *' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio\MyProjects\text3\b.cpp(125) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class Node' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio\MyProjects\text3\b.cpp(127) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class Node' (or there is no acceptable conversion)
Error executing cl.exe.
展开