链表重载等号_结点类 等号 重载问题

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.

展开

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值