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

急next = item->next; “=”: 作为左操作数。 !

2012-03-13 
急啊!`next item-_next “”: 作为左操作数。 在线等!~classilist_item{public:ilist_item(intvalue,ili

急啊!`next = item->_next; “=”: 作为左操作数。 在线等!~
class   ilist_item{
public:
ilist_item(   int   value,   ilist_item   *item_to_link_to   =   0);
int   value()   {   return   _value;   }
ilist_item*   next()   {   return   _next;   }

void   next(   ilist_item   *link   )   {   _next   =   link;   }
void   value(   int   new_value   )   {   _value   =   new_value;   }
private:
int   _value;
ilist_item   *_next;
};
inline  
ilist_item::
ilist_item(int   value,   ilist_item   *item)
                    :   _value(   value   )
{
if(   !item   )
_next   =   0;
else   {
next   =   item-> _next;
item-> _next   =   this;
}
}

VC8.0里提示   next   =   item-> _next;   这行的“=”:   作为左操作数   错误!~
      怎么解决哈   讲讲为什么哈

[解决办法]
next = item-> _next
===>
_next = item-> _next

热点排行