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

Compile Error

card.cpp: In function ‘int main()’:
card.cpp:23:13: error: invalid conversion from ‘Node*’ to ‘int’ [-fpermissive]
23 | Node end = new Node(m-1);
| ^~~~~~~~~~~~~
| |
| Node*
card.cpp:11:11: note: initializing argument 1 of ‘Node::Node(int)’
11 | Node(int new_value) {
| ~~~~^~~~~~~~~
card.cpp:35:9: error: base operand of ‘->’ has non-pointer type ‘Node’
35 | *(end->head) = new_node;
| ^~
card.cpp:36:20: error: cannot convert ‘Node’ to ‘Node*’ in assignment
36 | new_node.tail = end;
| ^~~
| |
| Node