To use the validity checker, to see if your PG5 is producing valid Red-Black trees: In your ProcessCommand method, after processing a command, issue something like this: if (((RBTree *)Studs)->Valid()) { cout << "Tree is valid." << endl; } else { cout << "Tree is not valid." << endl; }