Templated BST "Already Initialized" Error
Hi all,
I'm implementing a linked BST to create a simple program to store, search, and retrieve records. Whenever I instantiate a new CityRecord object in my main function as follows:
Code:
SearchTree<int, CityRecord> stree;
SearchTree<int, CityRecord>::Position p;
I get error
Code:
Error 3 c:\users\pogos\desktop\classes fall 2011\csci 220\projects\project 4\project 4\project 4\searchtree.h
91 error C2437: 'LBTree' : already initialized
which refers to
Code:
SearchTree() : LBTree() {}
in the search tree header file. I don't get this error when I comment out the main function body.
There are several files and hundreds of lines of code that would be ridiculous to post here, so could anyone please point me in the right direction in terms of where to properly start declaring a new search tree in my main function? I can give more info on the code as needed. Thank you! :)