Binary search tree example
This example is for a binary search tree where the stored
data elements consist of integer userids (used as the keys
for searching) and a floating point 'balance' field (e.g.
for user funds remaining).
Two implementations are provided
- The 'one big file' approach: tree_ex.C
This could be compiled using g++ -Wall -o myApp tree_ex.C
then run using ./myApp
- The 'seperate files' approach:
the search tree header file: tree.h
the search tree implementation: tree.C
the application code: app.C
This could be compiled using the following commands:
g++ -Wall -c tree.C
g++ -Wall -c app.C g++ -Wall -o myApp tree.o app.o
then run using ./myApp