What I'm trying to do is store the roll numbers of students in the 2-3 tree and each node of the tree will have a pointer to the doubly linked list's node which will point to the respective node in the doubly linked list. The whole purpose of doing this is to speed up the searching process.

What I did was that I put a pointer of doubly node in the Node class of 2-3 tree and when I add a roll number into the tree. I search that key value and associate it with the doubly node and add that node to the doubly linked list. Does this seem like the correct way to do this?
Code:


02 CTree<Student> *tree1;
03 doublyLinkedList<Student> d1;
04
05 Node<Student> *s1,*s2,*s3,*s4;
06 s1 = new Node<Student>;
07 s1->data.setData("Jake",12105092);
08
09 s2 = new Node<Student>;
10 s2->data.setData("Kyle",12105102);
11
12 s3 = new Node<Student>;
13 s3->data.setData("Neil",12105022);
14
15 s4 = new Node<Student>;
16 s4->data.setData("Sherlock",12105042);
17
18
19 // Tree Insertion
20 tree1 = new CTree<Student>();
21 tree1->insert(new Student("",12105092));
22 tree1->insert(new Student("",12105042));
23 tree1->insert(new Student("",12105102));
24 tree1->insert(new Student("",12105022));
25
26 tree1->findOWN(new Student("",12105092))->merge(s1);
27 tree1->findOWN(new Student("",12105092))->printDoublyNode();
What I'm stuck at is, how manipulate the doubly nodes? I mean for adding/deleting courses how can I manipulate them so that changes in the node also make changes in the doubly linked list as well?
Since I've to do searching through the 2-3 tree, I can get it to search the treeNode and return that Node to me. Maybe I can add a method in the tree Node class to return the doubly node if it is not NULL? I did that but it only makes changes in the doubly node itself not in the doubly linked list, why is that?