In my code, I need to find a way to store multiple data types together in a sort of tree structure, like this, https://s1.postimg.org/mb6r8nuz3/tree_ex.png , where the red boxes are type COURSE (a struct), the green boxes are type STUDENT (a different struct), and the red boxes are type int.
Currently, I have separate dynamic arrays for each of them, like so:
1 2 3
COURSE *arrc = new COURSE[1];
STUDENT *arrs = new STUDENT[1];
int *arrg = newint[1];
I am able to store and retrieve data from these just fine, but I want to know how to connect them. Any idea how I would go about doing this?