Enumeration constants (enum
values) are always of type int
in C, whereas they are distinct types in C++ and may have size different from that of int
.
Sources:
https://www.geeksforgeeks.org/enumeration-enum-c/amp/
http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B
Article Tags :
Recommended Articles