记录详情

Compile Error

foo.cc: In copy constructor ‘IntLinkList::IntLinkList(IntLinkList&)’:
foo.cc:70:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   70 |                 }while(i = i->next);
      |                        ~~^~~~~~~~~
foo.cc: In member function ‘void IntLinkList::Append(int)’:
foo.cc:100:17: error: ‘i’ was not declared in this scope
  100 |                 i->next = ntail;
      |                 ^
foo.cc: In member function ‘void IntLinkList::InsertAt(int, int)’:
foo.cc:114:39: error: ‘i’ was not declared in this scope
  114 |                         nnode->next = i;
      |                                       ^
foo.cc:118:21: error: ‘i’ was not declared in this scope
  118 |                 if (i->next == NULL)//如果要插入尾结点
      |                     ^
foo.cc:123:31: error: ‘i’ was not declared in this scope
  123 |                 nnode->next = i->next;//链接插入的结点和k号结点
      |                               ^
foo.cc: In function ‘int main(int, char**)’:
foo.cc:143:14: error: ‘i’ was not declared in this scope
  143 |         for (i = 0; i < n; i++)
      |              ^

信息

递交者
类型
自测
题目
P1026 OO7-1 链表类的构造、析构
语言
C++
递交时间
2024-04-07 00:39:27
评测时间
2024-04-07 00:39:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes