首先。我欣赏帮助家伙!将节点指针设置为空
这是设置列表的优势之一为null
list[i].getAttachedNode(j) = 0;
这是错误的problem.Trying。
Prj3.cpp:165:34: error: lvalue required as left operand of assignment
这是我的列表删除。
Node list[47];
这是attachedNode实现。
Node* Node::getAttachedNode(int direction) {return attachedNode[direction];}
并[b]下面是其包含在块
for(int i = 0; i<48; i++)
{
for(int j = 0; j<6; j++)
{
string info = g.returnInfo(i,j);
switch(j)
{
case 0:
list[i].setNodeName(info);
break;
case 1:
if(info.compare(null) == 0)
{list[i].getAttachedNode(j) = 0;}
break;
}
}
}
您应该返回'Node *&'。 –
让我看看清单的声明 – dchhetri
@SethCarnegie:你应该回答这个问题...... –