Talk:C++ Programming/Programming Languages/C++/Code/Statements/Variables/Type

Written By Emry: At the bottom of the page is a ToDo item saying that we need to explain what an enum is, and how they relate to integers. Personally I think that we have already explained sufficiently what they are, and can simply add an explanation of their place along side integers.

For all intents and purposes an enum IS an integer. Given the following:

Most compilers will treat 1+1, or 1+truck exactly the same. Either way it will either cast to an int as 2, or (toys) as car. Try feeding an enum to cout.

would result in 1