CS 153 Data Structures I
Programming Assignment #11
Introductory Binary Search Tree
This programming assignment is designed to:
Overview of the project:
The Display(..) function will get called from OnButtonInsert. It must pass the CListBox (since the ListBox belongs to the ...Dlg class and the Display(...) function is a member of the BST class. The Display()ing activity needs to be recursive so the Display() function will need to call a recursive function named DisplayHelper(). The Display() and DisplayHelper() functions might look like the following.
void BST::Display(CListBox & listing ) { listing.ResetContent(); DisplayHelper(listing,Root); }
void BST::DisplayHelper(CListBox & listing, Node * current) { char temp[20]; // used to pass a value to the ListBox if( current == NULL ) return; DisplayHelper(listing, current->LC); // put the integer in the 'current' node into the listbox // process (recur) on the right child of the current node }