#include #include using namespace std; // myTypesInClass2.cpp //enum monthType { JAN=1, FEB=2, MAR=3, APR=4, MAY=5 }; string months[6]={"Jan","Feb","Mar","Apr","May" }; class Base { public: //monthType Type; enum monthType { JAN=1, FEB=2, MAR=3, APR=4, MAY=5 }; //will not compile when JAN is used here //string months[6]={"JAN","Feb","Mar","Apr","May" }; }; int main() { Base base; cout<<"\n reading enum as class object"; cout<<"\n months[0] " << months[0]; cout<< ",-- base.JAN :"<< base.JAN; int j=0; cout<<"\n --- reading enum with a loop--\n"; for(int i= base.JAN; i< base.MAY; i++ ) { cout<<"\n month "<