This C++ program shows how to use enumerated type . The enum is a compound data type and works in C++ exactly the way it works in ANSI-C with one small exception. The keyword enum is not required to use when defining a variable of the enum type, but it can be used if desired.

Output of the C++ Program:

The game was played and we won!

The game was played and we lost.

The game was played

The game was cancelled