好像没有这种定义吧?!通常true能非0,但是有时候也可以true==0的,我遇到过

解决方案 »

  1.   

    前面两位,是TRUE 不是 true
      

  2.   

    标准C的定义
    #define TRUE -1
    就是说在16位操作系统中是0xff
    在32位操作系统中是0xffff
      

  3.   

    TRUE是什么东西?TRUE can be anything.#undef TRUE
    typedef int TRUE;//or#undef TRUE
    #define TRUE return哈哈讨论这个有什么意思
      

  4.   

    #ifndef TRUE
    #define TRUE                1
    #endif
    所以是属于一种后续默认定义
      

  5.   

    windef.h里面定义
    BOOL型是int型,
    然而,msdn里面的解释是:
    BOOL Boolean variable (should be TRUE or FALSE). 
    这个Boolean何解阿?
      

  6.   

    既然是在VC论坛,应该说是VC中的TRUE吧?看看 AFX.H
    // Standard constants
    #undef FALSE
    #undef TRUE
    #undef NULL#define FALSE   0
    #define TRUE    1
    #define NULL    0
      

  7.   

    补充一下,太多的地方定义TRUE = 1了,我粗略查了一下,有:
    afx.h, d3drmdef.h, snados.h, sqlfront.h, srvconst.h,
    windef.h, wtypes.h
      

  8.   

    阿,这个问题我明白了,
    BOOL Boolean variable (should be TRUE or FALSE). 
    msdn里面这句话怎么翻译?
    BOOL型不是int型么?
      

  9.   

    TRUE 和 true 通常定义为非零。