CompuServe Messages

#C++ types

    05-Mar-90 16:14:46
Sb: #24364-#C++ types
Fm: John M. Dlugosz 74066,3717
To: Al Stevens 71101,1262
Enums are distinct types. They are distinct from each other, and distinct from ints. You can overload functions based on different enum typed parameters. You can implicitly convert an enumeration constant to an int, but not vice-versa. The type of an enumeration is the enumeration type. Order a reference manual from AT&T. $25 well spent. Then see sections 7.2 (enum types) and 13.1 (overloading). As long as I looked it up, I'll quote: "Each enumeration defines an integral type that is different from all other integral types. The type of an enumerator is its enumeration. The value of an enumerator or an object of an numeration type is converted to an integer nu integral promotion (see4.1)" Doest that other compiler have a command line switch? Try -b-, since -b is "on" by default incorrectly. –John