Exemplo n.º 1
0
int main() {
   testBST();

   cout << "\nfinished" << endl;

   cin.ignore();

   return 0;
}
Exemplo n.º 2
0
int main() {
    PTR_CARD deck1=new Card, deck2 = new Card;
    BinarySearchTree<PTR_CARD> *Cards1, *Cards2, *Cards3, *Cards4;
        
    int pips, suites;
    Cards1 = new BinarySearchTree<PTR_CARD>(comparePips);
    Cards2 = new BinarySearchTree<PTR_CARD>(compareSuits);
    Cards3 = new BinarySearchTree<PTR_CARD>(comparePips);
    
    srand (time(0));
    
    for (int count = 0; count < 25; count++) {
        drawCard(pips,suites);
        deck1 = new Card(pips,suites);
        Cards1->insert(deck1);
        deck1 = new Card(pips,suites);
        Cards3->insert(deck1);
        
        drawCard(pips, suites);
        deck2 = new Card(pips, suites);
        Cards2->insert(deck2);
    }
    
    cout << (Cards1==Cards3) << endl;
    cout << (Cards1==Cards2) << endl;
        
    Cards1->inOrder(displayPTR_CARD);
    cout << endl;
    Cards2->inOrder(displaySuitPTR_CARD);
    
    testBST(Cards1);
    
    testBST(Cards2);
        
    testDelete(Cards1, Cards2);
    
    testCopyAndAssign(Cards1, Cards2);
    
    return 0;
}
Exemplo n.º 3
0
int main() {
    srand(time(NULL));
    //testLL();
    testBST();
    return 0;
}