记录详情

Compile Error

/in/foo.cc: In constructor 'IntLinkList::IntLinkList(char*)':
/in/foo.cc:64:21: error: variable 'std::ifstream fin' has initializer but incomplete type
   ifstream fin(fname);
                     ^
/in/foo.cc: In copy constructor 'IntLinkList::IntLinkList(IntLinkList&)':
/in/foo.cc:77:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   }while(i = i->next);
                 ^~~~
/in/foo.cc: In member function 'void IntLinkList::Append(int)':
/in/foo.cc:107:3: error: 'i' was not declared in this scope
   i->next = ntail;
   ^
/in/foo.cc: In member function 'void IntLinkList::InsertAt(int, int)':
/in/foo.cc:121:18: error: 'i' was not declared in this scope
    nnode->next = i;
                  ^
/in/foo.cc:125:7: error: 'i' was not declared in this scope
   if (i->next == NULL)//如果要插入尾结点
       ^
/in/foo.cc:130:17: error: 'i' was not declared in this scope
   nnode->next = i->next;//链接插入的结点和k号结点
                 ^
/in/foo.cc: In function 'int main(int, char**)':
/in/foo.cc:150:7: error: 'i' was not declared in this scope
  for (i = 0; i < n; i++)
       ^

信息

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