码迷,mamicode.com
首页 > 数据库 > 详细

#include<stdbool.h>

时间:2016-06-11 17:21:24      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:

 

可以使用bool和true、false

输出是1或者0

 

 1 #define _CRT_SECURE_NO_WARNINGS
 2 
 3 #include<stdio.h>
 4 #include<stdbool.h>
 5 
 6 main()
 7 {
 8     bool b = 6 > 5;
 9     bool t = true;
10 
11     t = 2;
12 
13     printf("%d\n", b);//1
14 
15     system("pause");
16 }

 

#include<stdbool.h>

标签:

原文地址:http://www.cnblogs.com/denggelin/p/5575436.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!