记录详情

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(int)':
/in/foo.cc:27:19: error: class 'LinkList' does not have any field named 'head'
     LinkList(int):head(NULL),Count(0)
                   ^~~~
/in/foo.cc: In member function 'int& LinkList::operator[](int)':
/in/foo.cc:73:19: error: 'head' was not declared in this scope
         Node *p = head;
                   ^~~~
/in/foo.cc: In destructor 'LinkList::~LinkList()':
/in/foo.cc:82:16: error: 'head' was not declared in this scope
         while (head)
                ^~~~
/in/foo.cc: In member function 'void LinkList::deleteNode()':
/in/foo.cc:89:19: error: 'head' was not declared in this scope
         Node *p = head;
                   ^~~~

信息

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