Hi! guys! I have a question about generic linked list.
This is an example using C.

typedef struct list{
	void *info;
	struct list *next;
} List;

but now I have to translate it to C++, but I must use template instead of void*.

template <class T>
class Node{
	T info;
	Node<T>* next;
	Node(T m, Node<T> *p = NULL) {info = m; next = p;}

template <class T>
class List{
	Node<T> *first;
	List(void){ first = NULL; }
        void insert(T m);
	void print();

I figured out that I can only get a list with one type node and not a list with different types of nodes.

int main(){
          // One type nodes
        List<int> L;
        List<float> F;
        List<string> S;

How can I use templates with generic data nodes?


*FirstPointer -> int -> float -> string -> int -> char -> NULL


>How can I use templates with generic data nodes?
Store polymorphic objects or pointers to void.