C++语言程序设计

| 表2-5

从 | 到 | 方法
unsigned　char | char | 最高位作为符号位
unsigned char | short | 0扩展
unsigned char | long | 0扩展
unsigned char | unsigned short | 0扩展
unsigned char | unsigned long | 0扩展
unsigned char | float | 转换到long; 再从 long 转换到float
unsigned char | double | 转换到long; 再从 long 转换到double
unsigned char | long double | 转换到long; 再从 long 转换到double
unsigned short | char | 保留低位字节
unsigned short | short | 最高位作为符号位
unsigned short | long | 0扩展
unsigned short | unsigned char | 保留低位字节
unsigned short | unsigned long | 0扩展
unsigned short | float | 转换到long; 再从 long 转换到float
unsigned short | double | 转换到long; 再从 long 转换到double
unsigned short | long double | 转换到long; 再从 long 转换到double
unsigned long | char | 保留低位字节
unsigned long | short | 保留低位字节
unsigned long | long | 最高位作为符号位
unsigned long | unsigned char | 保留低位字节
unsigned long | unsigned short | 保留低位字节
unsigned long | float | 转换到long; 再从 long 转换到float
unsigned long | double | Convert directly to double
unsigned long | long double | 转换到long; 再从 long 转换到double