谁说过TRUE == 1的? 好像没有这种定义吧?!通常true能非0,但是有时候也可以true==0的,我遇到过 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 前面两位,是TRUE 不是 true 标准C的定义#define TRUE -1就是说在16位操作系统中是0xff在32位操作系统中是0xffff TRUE是什么东西?TRUE can be anything.#undef TRUEtypedef int TRUE;//or#undef TRUE#define TRUE return哈哈讨论这个有什么意思 #ifndef TRUE#define TRUE 1#endif所以是属于一种后续默认定义 windef.h里面定义BOOL型是int型,然而,msdn里面的解释是:BOOL Boolean variable (should be TRUE or FALSE). 这个Boolean何解阿? 既然是在VC论坛,应该说是VC中的TRUE吧?看看 AFX.H// Standard constants#undef FALSE#undef TRUE#undef NULL#define FALSE 0#define TRUE 1#define NULL 0 补充一下,太多的地方定义TRUE = 1了,我粗略查了一下,有:afx.h, d3drmdef.h, snados.h, sqlfront.h, srvconst.h,windef.h, wtypes.h 阿,这个问题我明白了,BOOL Boolean variable (should be TRUE or FALSE). msdn里面这句话怎么翻译?BOOL型不是int型么? TRUE 和 true 通常定义为非零。 请教CreateThread()这个函数的一个参数问题 请教一个关于WebServer服务器的问题: 麻烦问一下off文件的导入问题 请问三态复选框怎么用变量来表示状态。 Tcp/ip网关互连问题 如何得到一个文件的修改日期和大小? 求救一道概 哪有VB与VC的数据类型对照表 有关Dao的一初级问题 redis 如何编写 win64位程序 Who can tell me that SetCursorPos() can not take effect 如何替换系统DLL??
#define TRUE -1
就是说在16位操作系统中是0xff
在32位操作系统中是0xffff
typedef int TRUE;//or#undef TRUE
#define TRUE return哈哈讨论这个有什么意思
#define TRUE 1
#endif
所以是属于一种后续默认定义
BOOL型是int型,
然而,msdn里面的解释是:
BOOL Boolean variable (should be TRUE or FALSE).
这个Boolean何解阿?
// Standard constants
#undef FALSE
#undef TRUE
#undef NULL#define FALSE 0
#define TRUE 1
#define NULL 0
afx.h, d3drmdef.h, snados.h, sqlfront.h, srvconst.h,
windef.h, wtypes.h
BOOL Boolean variable (should be TRUE or FALSE).
msdn里面这句话怎么翻译?
BOOL型不是int型么?