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. } |
Top | Master Index | C++ Keywords | Functions |