bool

bool

c沒有bool的類型

include

#include <stdbool.h>

非0為true

1
2
3
    if(1) {
        printf("true\n");
    }

其它類型有值,也為true

    int i = 10;
    if(i) {
        printf("true\n");
    }

results matching ""

    No results matching ""