Templated Nodes for LinkedList

How do i template the a node instantiated in a class list without templating the class list?

ex:

node<char> -> node<int> -> node<string>... -> NULL;
1st node 2nd node 3rd node

its like a list of dynamic data..
You do realize that in order for this to work, each node can't hold type information about the next node, right? Otherwise, how is a node<char> supposed to know what a node<int> or a node<SomeTypeIJustMadeUp> are?

Try to rethink your design so you don't have to do this, because the solution is very ugly and error-prone.
what i am trying to ask is that is their a possibility to create a linkedlist of different kinds of datatype in it?

This has been discussed before, recently -> http://www.cplusplus.com/forum/beginner/43068/
Topic archived. No new replies allowed.