记录详情

Compile Error

/in/foo.cc:71:10: error: 'int& LinkList::operator[](int)' cannot be overloaded
     int &operator[] (int idx)
          ^~~~~~~~
/in/foo.cc:64:7: error: with 'int& LinkList::operator[](int)'
  int &operator[](int index)
       ^~~~~~~~
/in/foo.cc: In constructor 'LinkList::LinkList()':
/in/foo.cc:34:3: error: 'Head' was not declared in this scope
   Head=NULL;  Node *tail=NULL;
   ^~~~
/in/foo.cc: In copy constructor 'LinkList::LinkList(LinkList&)':
/in/foo.cc:50:3: error: 'Head' was not declared in this scope
   Head=NULL;  Node *tail=NULL;
   ^~~~
/in/foo.cc:52:17: error: 'class LinkList' has no member named 'Head'; did you mean 'head'?
   for(Node *p=L.Head; p; p=p->next)
                 ^~~~
/in/foo.cc: In member function 'int& LinkList::operator[](int)':
/in/foo.cc:66:11: error: 'Head' was not declared in this scope
   Node *p=Head;
           ^~~~

信息

递交者
类型
递交
题目
P1027 OO7-2 把链表对象包装成数组
语言
C++
递交时间
2019-04-26 19:29:23
评测时间
2019-04-26 19:29:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes