首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

帮忙看一个重载,多谢

2012-03-24 
帮忙看一个重载,谢谢//帮忙看一下,那个!=重载对没?好像没错。。。//编译错误:赋值运算中的左值无效structfib_

帮忙看一个重载,谢谢
//帮忙看一下,那个!=重载对没?好像没错。。。
//编译错误:赋值运算中的左值无效
struct                                 fib_node{
                                fib_node                                 *left;
                                fib_node                                 *right;
                                fib_node                                 *parent;
                                fib_node                                 *child;
                                int                                                                                                 key;
                                int                                                                                                 degree;
                                bool                                                                 mark;

                        bool         operator!=(fib_node         &other)
                                {
                                                                return         (this-> left         !=         other.left         ||         this-> right         !=         other.right         ||         this-> parent         !=         other.parent        
                                                                                                                                ||         this-> child         =         other.child         ||         this-> key         !=         other.key         ||         this-> degree         !=         other.degree        


                                                                                                                                ||         this-> mark         !=         other.mark);                        
                                }//!=

};

[解决办法]
this-> child = other.child
少了!

热点排行
Bad Request.