In building node class of hashtable

in this code what is the meaning of node *next can’t we directly write node *next while using template and why not if we can’t?

@Saurabh10
The class node is a templated class. This means that the value which the node stores can be of any data type. Thus while declaring an object, you also would have to specify the data type of the value which will be stored in the node. Thus you will have to use the syntax, node* n = new node(val);
It is analogous to the way you declare vectors or sets.

If my answer is able to resolve your query, please mark the doubt as resolved.