#include #include #include "BodyPartT.h" using namespace std; int main() { BodyPartT i{FIRST_BODY_PART}; while (i != BodyPartT::NONE) { cout << "\t" << BodyPartTToString(i) << endl; i = NextBodyPartT(i); } cout << endl; // this one is an error //cout << BodyPartTToString(4) << endl; // I wish this one were an error as well // but it is not, so I had to build something in to my base class to fix it. // It will still be an error if someone skips my routines. // I am sure that you can still find a way to get bad data into a variable cout << "Testing for a bad static cast " << endl; i = static_cast(999); cout << "\t" << BodyPartTToString(i) << endl; return 0; }