<<< Stream I/O | Index | User-defined types >>> |
Keyword enum
Examples:
enum Suit { CLUB, DIAMOND, HEART, SPADE }; Suit s; // enum keyword here not required s = CLUB; // of course s = (Suit) 1; // Ok, not recommended s = 1; // ERROR switch ( s ) { //... enum PrintFlags { COLOR = 1, LANDSCAPE = 2, TWOSIDE = 4 };
<<< Stream I/O | Index | User-defined types >>> |