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); } } };
void Print() { // print to screen _root->Print(0); };