c++问题,!=号也要定义?
来源:百度知道 编辑:UC知道 时间:2024/05/22 06:07:48
binary '!=' : no operator defined which takes a right-hand
怎么!=也要定义??
这个问题怎么解决
if(pcurrent!=NULL&&pcurrent!=head)
if((pcurrent!=NULL)&&(pcurrent!=head))
2个都不行
怎么!=也要定义??
这个问题怎么解决
if(pcurrent!=NULL&&pcurrent!=head)
if((pcurrent!=NULL)&&(pcurrent!=head))
2个都不行
关键看head是啥类型的
代码都贴上来
不会是你自己定义的类吧?
这两个是一样的。pcurrent和head是一个类型吗?C++中 != 等运算符是允许重载的,请检查pcurrent和head的类型。
第一个对着