CR的代码文本

all for learning about the world
  订阅 订阅  :: 管理

关于define活生生的SB实例,挂起来

Posted on 2011-10-11 20:52  mumuliang  阅读(479)  评论(4编辑  收藏  举报
#include <iostream>
#include <vector>

#define MINUTES_12H    60*24.

int main(int argc, char** argv)
{
    double tmp1 = 80./MINUTES_12H;
    double tmp2 = 80./1440.;

    printf("use MACRO. = %.5f\n", tmp1);
    printf("use 1440.  = %.5f\n", tmp2);


    system("PAUSE");
    return 0;
}


tmp1和tmp2的值是不一样的.

推测可能的缘由跟内存排布有关。。。

求详解

。。。。

我。。。。划圈儿去。。。