C语言中 false不是关键字也不是函数,但是在c++中false 是关键字。
在计算机语言中,false表示常数0. 一个表示与 true 相反的唯一布尔值。true表示"1",false表示"0".当自动数据类型指定将 false 转换为数字时,它变为0;将 false 转换为字符串时,它变为 "false" 。
关键字(keyword)又称保留字,是整个语言范围内预先保留的标识符。每个C++关键字都有特殊的含义。经过预处理后,关键字从预处理记号(preprocessing-token)中区出来,剩下的标识符作为记号(token),用于声明对象、函数、类型、命名空间等。不能声明与关键字同名的标识符。
C语言关键字有:由ANSI标准定义的共32个 :
auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if while static
C++关键字有:
ISO C++98/03关键字共63个,此处严格按标准原文排版:
asm do if return typedef auto double inline short typeid bool dynamic_cast int signed typename break else long sizeof union case enum mutable static unsigned catch explicit namespace static_cast using char export new struct virtual class extern operator switch void const false private template volatile const_cast float protected this wchar_t continue for public throw while default friend register true delete goto reinterpret_cast try
false 是C++的关键字,因此自动变蓝,而且不能重新声明,其整数值就是C语言的逻辑假:0
FALSE 是一个宏,一般定义成:#define FALSE 0,用于比较或函数返回值.
你可以 #ifdef false
#undef false 接着搞