10.自动类型转换(automatic type conversion)是拓宽转换(widening conversion),要求是相互兼容的类型。其中数字类型和字符类型或布尔类型是不兼容的,字符类型和布尔类型也是不兼容的。
基于48个网页-相关网页
Define conversion operators to simplify narrowing and widening conversions between numeric types.
定义转换操作符来简化数字类型之间的缩小和放大转换。
An example of a widening conversion is converting a value that is a 32-bit signed integer to a value that is a 64-bit signed integer.
扩展转换的一个例子是将32位有符号整数值转换为64位有符号整数值。
A conversion, either widening or narrowing, must be possible between the element types of the two arrays.
必须可以在两个数组的元素类型间进行转换(扩大转换或收缩转换)。
应用推荐