bool值的字面值

来源:互联网 发布:sql*plus命令 编辑:程序博客网 时间:2024/05/17 17:16
#include<iostream>int main (){int a; // a是变量,a = 11;// 11是字面值,bool test = false;//test是变量,test = true;//true 是字面值,std::cout << (true && false) << std::endl; // 输出是0,&&是andstd::cout << (false || true) << std::endl; // 输出是1,||是或return 0;}

0 0
原创粉丝点击