In one of my assignment, I want to write a single linked list in which data portion is of diffrent types.
eg:
one node as int, other node as char, other node should be user defined struct and 4th should be user defined object.
You have a homework assignment to write a heterogeneous container? Are you sure the assignment doesn't mean to use templates and each instantiation of the list type can hold a collection of one of those types?