Example #1
0
 void Print(int x) { // just for trace/debug the program
     int y = x;
     if (this) {
         while (x > 0) {
             cout << " ";
             x--;
         }
         cout << stateName[data] << endl;
         if (left) {
             left->Print(y+1);
         }
         if (right) {
             right->Print(y);
         }
     }
 };
Example #2
0
    void Print() { // print to screen
	    _root->Print(0);
    };