Skip to content

Commit 86368bc

Browse files
committed
Improved example.
1 parent f2e951a commit 86368bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/enum.md

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ enum months {
3030
NOV,
3131
DEC,
3232
};
33+
34+
/* See how you define a variable of an enum. */
35+
enum months mymonth = FEB;
3336
```
3437

3538
You could also do as follows:
@@ -45,6 +48,8 @@ enum weird {
4548
seven = -1,
4649
...
4750
}
51+
52+
enum weird myweird = six;
4853
```
4954

5055
The list consists of *enumerators*. I.e. both `JAN = 1` and `FEB` are

0 commit comments

Comments
 (0)