Enum values as char array in c++
c++, enums
Solution
Short answer no. There's a number of "idiomatic" macro tricks that you can do to mimick the effect, though.
The reason for this is that C++ tends to make you "Pay for what you need only" (which makes it possible to write much more performant code if you design it cardefully).
Code project has an article on this, and google will turn up many others.
Problem
i have an enum in c++ ``` enum color { BLACK,GREEN,RED }; ``` In java i can receive the string value using `color.BLACK.name()` will give me the String value.. Do c++ have the same behaviour or how can i convert an enum to char*.