Problem card
User YH
Submission Time 2024-02-06 18:26:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp:8:14: error: field ‘tail’ has incomplete type ‘Node’
8 | Node* head, tail;
| ^~~~
card.cpp:5:7: note: definition of ‘class Node’ is not complete until the closing brace
5 | class Node {
| ^~~~
card.cpp: In function ‘int main()’:
card.cpp:28:13: error: invalid conversion from ‘Node*’ to ‘int’ [-fpermissive]
28 | Node end = new Node(m-1);
| ^~~~~~~~~~~~~
| |
| Node*
card.cpp:10:11: note: initializing argument 1 of ‘Node::Node(int, Node*, Node*)’
10 | Node(int new_value, Node* new_head = nullptr, Node* new_tail = nullptr) {
| ~~~~^~~~~~~~~