这句话就错了:ANSI range of values for int include -32627 to 32767


所有跟贴·加跟贴·新语丝读书论坛

送交者: 你太有才了 于 2009-03-12, 14:53:32:

回答: 32767+1, one more time 由 JJZ 于 2009-03-12, 12:41:52:

学斯蒂夫,也贴段code:

引用:

    short i = 32767;
    printf ("i=%d ", i);
    short j = i + 1;
    int k1 = j;
    int k2 = i + 1;
    i++;
    printf ("j=%d ", j);
    printf ("k1=%d ", k1);
    printf ("k2=%d ", k2);
    printf ("i++=%d\n", i);

引用:

i=32767 j=-32768 k1=-32768 k2=32768 i++=-32768




所有跟贴:


加跟贴

笔名: 密码: 注册笔名请按这里

标题:

内容: (BBCode使用说明