dell latitude D600,CPU 1.4G, memory 1G 我玩了玩,leopard跑得相当smooth,半点迟滞都没有。唯一有问题的地方就是 网卡和airport没搞定合适的driver。 琢磨着以后我要是买desktop是不是舍弃apple奔向psystar呢?
x*e
7 楼
in C/C++, what is the most portable way to subtract an int from unsigned int? int a; unsigned b; a could be either positive or negative, b>0 and cannot be represented by int (may overflow) and I know b>abs(a) and b+abs(a) will not overflow in unsigned int. is it safe and portable to write b-=a; or what is the best way to write it?
yes it is ok to write that way. int will be converted to unsigned and the result is unsigned. negative number can be automatically handled (wrap around). but most compiler will issue a warning against this case (if the warning level is high -- which is recommended). so you better write b-=(unsigned)a;
int?
【在 x**e 的大作中提到】 : in C/C++, what is the most portable way to subtract an int from unsigned int? : int a; : unsigned b; : a could be either positive or negative, : b>0 and cannot be represented by int (may overflow) : and I know b>abs(a) and b+abs(a) will not overflow in unsigned int. : is it safe and portable to write : b-=a; : or what is the best way to write it?