Node* data type

while watching the linked list video I came across
lass node{
public:
int data;
node*next;

node(int d){
    data=d;
    next = NULL;
}

};
I don’t understand the node* data type here, is this an inbuilt data type or user defined .

Node is a user defined data type and Node* is a pointer to that data type.
It is used in linked list as next will also store a next (1->2->3->4…) so 1’s next is 2 then 2’s next is 3 and so on.
So we need next as Node* pointer

so we can use the data type inside the defination of that user -defined data type

Yes, you can do that.
It only means that this data type will have a pointer to another object of same type.
You can keep the pointer to null if you don’t wish to use it.
Please mark the doubt as resolved if you think that your doubt has been resolved.