记录详情

Compile Error

/in/foo.cc: In constructor 'LinkList::LinkList(int)':
/in/foo.cc:73:15: warning: unused variable 'head' [-Wunused-variable]
   73 |         Node* head = new Node;
      |               ^~~~
/in/foo.cc:74:15: warning: unused variable 'tail' [-Wunused-variable]
   74 |         Node* tail = new Node;
      |               ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:162:23: error: cannot bind non-const lvalue reference of type 'LinkList&' to an rvalue of type 'LinkList'
  162 |     LinkList La,Lb,Lc=0;
      |                       ^
/in/foo.cc:50:24: note:   initializing argument 1 of 'LinkList::LinkList(LinkList&)'
   50 |     LinkList(LinkList& obj)
      |              ~~~~~~~~~~^~~
/in/foo.cc:71:5: note:   after user-defined conversion: 'LinkList::LinkList(int)'
   71 |     LinkList(int x)
      |     ^~~~~~~~

信息

递交者
类型
自测
题目
P1029 OO7-3 链表对象的交集
语言
C++
递交时间
2025-03-29 21:41:13
评测时间
2025-03-29 21:41:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes