From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/CPLUSPLUS/SYNTAX/enum.html | 110 +++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 reference/CPLUSPLUS/SYNTAX/enum.html (limited to 'reference/CPLUSPLUS/SYNTAX/enum.html') diff --git a/reference/CPLUSPLUS/SYNTAX/enum.html b/reference/CPLUSPLUS/SYNTAX/enum.html new file mode 100644 index 0000000..0f48a16 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/enum.html @@ -0,0 +1,110 @@ + + + ENUM keyword + + + + +
+
+

+C++ changes to ENUM. +

+
+ +
+ +

In the C++ world, the rules applying to +enum have been altered. + +

+
+ + + +
+
+
+    main ()
+    {
+        enum Currancy = {STERLING, DOLLAR, RUPEE};
+                                                                
+        enum Currancy GreenBack = DOLLAR;     // Valid in C and C++
+        Currancy Pounds = STERLING;           // Valid in C++ only.
+
+    }
+
+
+ + + + +
+ + + +
+
+
+    main ()
+    {
+        enum Currancy = {STERLING, DOLLAR, RUPEE};
+
+        Currancy Pounds = STERLING;
+
+        Pounds = 2;             // Invalid Statement.
+
+        Pounds++;               // Invalid Statement.
+    }
+
+
+ +

+


+

+Examples:

+o Example +program.   +
+

+See Also:

+ +
+

+C References

+o C +version of enum. + +

+


+
+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +25-Oct-98

+ + + -- cgit v1.2.3-54-g00ecf