In the following, I don't know if I am confusing enums in C # with C ++, but I thought you could only use enums in enum using Forms::shape , which actually gives an error.
int main() { enum Forms {shape, sphere, cylinder, polygon}; Forms form1 = Forms::shape;
Why is shape allowed access outside of enum without a scope operator and how can I prevent this behavior?
source share