anyway this is what happened,
Code:
enum WHATSHAPE { TRIANGLE, SQUARE, CUBE };
class SHAPE
{
enum SHAPETYPE { DEFAULT, CUBE }m_ShapeType;
}
now i made a member function for the shape class, here is the definition
Code:
void CreateShape(WHATSHAPE shape)
{
switch (shape)
{
case TRIANGLE:
break;
case SQUARE;
break;
case CUBE: // error, will say that cube is already used, ie it's value is 1;
break;
}
so the solution to that is, to make my case CUBE: like this instead,
case WHATSHAPE::CUBE, and this would work out well.,
and my question is this, how come this doesn't want to work?
case WHATSHAPE::SQUARE and case WHATSHAPE::TRIANGLE, i would have to modify my
enum SHAPETYPE and add these two constant value for that to work?
thanks a bunch!