【发布时间】:2015-06-03 21:23:30
【问题描述】:
如何在不使用 unsigned 标记的情况下修改 ANSI C 中的以下行?
unsigned int x, y, z; // unsigned variables should not be used
/*... some operations where x, y and z gets values between 0x0 and 0xFFFFFFFF ... */
x = (unsigned int)-(int)(y * z); // line to modify
【问题讨论】:
-
我不明白。声明三个
unsigned int类型变量的那一行标有注释“不应使用无符号变量”。
标签: c unsigned unsigned-integer ansi-c