可不可以用for循环?
#define COMPARE(a, b, c) {\ (c) = (a) - (b); \ (c) = (unsigned)(c) >> (sizeof(int) * 8 - 1);\}
[此贴子已经被作者于2007-11-17 23:45:49编辑过]
就是判断a - b的符号位如果是1,则c是负数,说明a比b小如果是0,则c是整数,说明a比b大