Skip to content

Instantly share code, notes, and snippets.

@marksands
Created February 14, 2009 11:36
Show Gist options
  • Save marksands/64338 to your computer and use it in GitHub Desktop.
Save marksands/64338 to your computer and use it in GitHub Desktop.
// File: p06.cpp
// Name: Mark Sands
// Date: 12/02/08
// Course: CS 240 - Introduction to Computing III
// Desc: This program demonstrates a Binary Search Tree with the ability to index by
// a static key value in order to sort, display, and remove in a robust manner.
//
// Other files required: IndexedBST.h, IndexedBST.cpp
//------------------------------------------------------------------------------------------
#include <iostream>
#include <iomanip>
#include <string>
#include "BST.h"
#include "SearchableADT.h"
void ShowStats( SearchableADT<string>*& dictionary );
int main( int argc, char* argv[] )
{
SearchableADT<string>* dictionary = new BST<string>;
ShowStats( SearchableADT<string>*& dictionary );
return 0;
}
void ShowStats( SearchableADT<string>*& dictionary )
{
cout << "Number of entries: "
<< dictionary->numEntries() << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment