summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 4764c38e..0ac603a7 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -54,6 +54,10 @@ Multi-line comments look like this. They work in C89 as well.
// Constants: use #define keyword, no semicolon at end.
#define DAYS_IN_YEAR = 365
+//enumeration constants are also ways to declare constants.
+enum days {SUN = 1, MON, TUE, WED, THU, FRI, SAT};
+// MON gets 2 automatically, TUE gets 3, etc.
+
// Import headers with #include
#include <stdlib.h>
#include <stdio.h>