Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Enums are used to make sure a variable can only have one
- of a small possible subset of values.
- */
- #include <iostream>
- using namespace std;
- enum direction
- {
- North,
- South,
- East,
- West
- } dir;
- int main()
- {
- dir = West;
- cout << dir;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement