Hello,
How I can declare the enumeration class as an interface and a realization in this situation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
namespace Menu
{
//errors
class WrongInPut {};
enumclass Identifier;
Identifier FeedBack();
void GUI();
}
/* here should be the realization which incomprehensible for me */
Can you be more precise? An enum class is a scoped and safer form of enum, it is not actually a fully fledged class. If by interface, you mean a java-like interface, you need to use an abstract class, not an enum class.
You can declare an enum class just like an ordinary enum
1 2 3 4 5 6 7
enumclass color : uint8_t
{
red, green, blue
};
color backgroundColor = color::blue;