1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include "readfile.h"
#include "BTNode.h"
#include "BT.h"
#include "intersect.h"
#include "Queue.h"
using namespace std ;
void menu(){
/.../ //intro stuff here
}
void function(customer &input , customer &input2, BT<customer>*tree,BT<customer>*tree2,BT<customer>*tree3,BTNode<customer>*t1,BTNode<customer>*t2,BTNode<customer>*t3){
char choice;
cout<<"Please select function:";//prompt for input
cin>> choice ;
cout<<endl;
switch (choice)
{
case '1':
readfile(input,tree,t1);//readfile function
system ("cls");
menu();
/...../ //not important function here
case '4':
intersect(tree,tree2,tree3,input,t1,t2,t3);
system ("cls");
menu();
//exit program stuff
}
int main()
{
customer input,input2,input3;
BTNode<customer> *t1=NULL,*t2=NULL,*t3=NULL;//I think the problem is the
BT<customer>* tree= new BT<customer>; //initialization here.
BT<customer>* tree2=new BT<customer>;
BT<customer>* tree3=new BT<customer>;
int counter1=0,counter2=0;
menu();
function(input,input2,tree,tree2,tree3,t1,t2,t3);
cout<<"the end ";
cin.get();
cin.get();
return 0;
}
| |