stupid situation. You can do it, but it does not make sence to change enum to namespace:
enum colors{green,red,black} ;
color x = green;
int y = (int)black;
change to
namespace colors
{
const int green = 1
const int red = 2;
const int black = -1;
}
int x = colors::green;
using namespace colors;
int y = black;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.