I'm working with Lists using C++ and I had a little doubt. Each Cell have a pointer to next cell and your data. Now each cell is using the class Data1.
class Data1
{
public:
int item1;
};
class Data2
{
public:
int item2;
};
class List
{
/* Each cell of list */
typedef class Cell
{
public:
class Data1 data;
class Cell *next;
}Cell;
.
.
.
}
How can I generic it to use Data1 or Data2 for diferent applications?
A better explaination is if Data2 are on another source code and the Cell point to Data2 not Data1.
Thank you!