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

C++ For Dummies 7th Edition
Unlock the world of programming with C++ for Dummies – the perfect beginner’s guide to mastering C++ with ease and confidence!
View on Amazon

The game was cancelled