Compartir a través de


Conversions from Other Types

Since an enum value is an int value by definition, conversions to and from an enum value are the same as those for the int type. For the Microsoft C compiler, an integer is the same as a long.

Microsoft Specific

No conversions between structure or union types are allowed.

Any value can be converted to type void, but the result of such a conversion can be used only in a context where an expression value is discarded, such as in an expression statement.

The void type has no value, by definition. Therefore, it cannot be converted to any other type, and other types cannot be converted to void by assignment. However, you can explicitly cast a value to type void, as discussed in Type-Cast Conversions.

END Microsoft Specific

See Also

Concepts

Assignment Conversions