3 ms·
I said enumeration constants are of type int. For example, given: enum foo { this, that, the_other }; enum foo obj; obj is of type "enum foo", which
by _kst_ 7y ago
I said enumeration constants are of type int.
For example, given:
enum foo { this, that, the_other };
enum foo obj;
obj is of type "enum foo", which is compatible with some implementation-defined integer type, but the constants "this", "that", and "the_other" are of type int.
In C++, the constants are of type "enum foo", which can also be referred to as "foo".