c++程序:error C2244:'linearlistlink::insert' :unable to resolve function overloadtemplatebool linearlistlink::insert(int k,const T& x){if (k0&&!p) throw outofbounds ();linknode *y=new linknode; y->date=x;if(k) { y->link=p->link;p->link=y;}else{ y

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 12:55:06
c++程序:error C2244:'linearlistlink::insert' :unable to resolve function overloadtemplatebool linearlistlink::insert(int k,const T& x){if (k0&&!p) throw outofbounds ();linknode *y=new linknode; y->date=x;if(k) { y->link=p->link;p->link=y;}else{ y

c++程序:error C2244:'linearlistlink::insert' :unable to resolve function overloadtemplatebool linearlistlink::insert(int k,const T& x){if (k0&&!p) throw outofbounds ();linknode *y=new linknode; y->date=x;if(k) { y->link=p->link;p->link=y;}else{ y
c++程序:error C2244:'linearlistlink::insert' :unable to resolve function overload
template
bool linearlistlink::insert(int k,const T& x)
{
if (k0&&!p) throw outofbounds ();
linknode *y=new linknode;
y->date=x;
if(k)
{
y->link=p->link;
p->link=y;
}
else
{
y->link=first;
first=y;
}
return ture;
}
编译之后总是出现:
error C2244:'linearlistlink::insert' :unable to resolve function overload
这是为什么呢?要怎么修改呢?

c++程序:error C2244:'linearlistlink::insert' :unable to resolve function overloadtemplatebool linearlistlink::insert(int k,const T& x){if (k0&&!p) throw outofbounds ();linknode *y=new linknode; y->date=x;if(k) { y->link=p->link;p->link=y;}else{ y
unable to resolve function overload
不能处理函数重载
你的代码不完整,无法帮你修改错误