View difference between Paste ID: Uxd6ETev and 01QaW09p
SHOW: | | - or go back to the newest paste.
1
struct Node
2
{
3
  Node(int value = 0)
4
    : value{value}, next{nullptr}
5
  {}
6
7
  int value;
8
  Node* next;
9
};
10
11
int main()
12
{
13
  Node* first{new Node{5}};
14
  first->next = first;
15
}