简体   繁体   中英

Why does GTK+ define TRUE and FALSE?

Why do GTK+ and several other frameworks provide TRUE and FALSE macros? Is there any advantage to using TRUE and FALSE instead of the built-in C values true and false ? You can see their implementation here: http://www.gtk.org/api/2.6/glib/glib-Standard-Macros.html#TRUE:CAPS

C99 has true and false , earlier versions do not. That is why you often see TRUE and FALSE #define d. As you can read here , true and false are 1 and 0 respectively, same as TRUE and FALSE .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM