Skip to content

Commit 34b90f5

Browse files
committedJul 9, 2024
Trying to create a dynamic node
1 parent a021dee commit 34b90f5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎dynamic_node.cpp

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
class Node
5+
{
6+
public:
7+
int val;
8+
Node *next;
9+
Node(int val)
10+
{
11+
this->val = val;
12+
}
13+
};
14+
15+
int main()
16+
{
17+
Node *head = new Node(10);
18+
Node *a = new Node(20);
19+
20+
return 0;
21+
}

0 commit comments

Comments
 (0)
Please sign in to comment.