次の方法で共有


Assignment Conversions

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Assignment Conversions.

In assignment operations, the type of the value being assigned is converted to the type of the variable that receives the assignment. C allows conversions by assignment between integral and floating types, even if information is lost in the conversion. The conversion method used depends on the types involved in the assignment, as described in Usual Arithmetic Conversions and in the following sections:

Type qualifiers do not affect the allowability of the conversion although a const l-value cannot be used on the left side of the assignment.

See Also

Type Conversions