2008年2月12日 星期二

在C裡面是沒有 bool.

在C裡面是沒有 bool.
There is no bool keyword in C. Instead booleans in C are the same as integers with a value of 0 for false or 1 for true. Thus the following is an infinite loop:
while(1) {
; /* do nothing */
}

Reference:
http://people.cs.uchicago.edu/~iancooke/osstuff/ccc.html

沒有留言: