当前位置: 首页 > news >正文

怎么做属于自己的音乐网站信阳网站seo

怎么做属于自己的音乐网站,信阳网站seo,seo现在还有前景吗,做网站站长一年能赚多少钱C中bool类型的使用细节 ANSIISO C标准添加了一种名叫bool的新类型(对 C来说是新的)。它的名称来源于英国数学家 George Boole,是他开发了逻辑律的数学表示法。在计算中,布尔变量的值可以是true或false。过去,C和C一样,也没有布尔…

C++中bool类型的使用细节

ANSIISO C++标准添加了一种名叫bool的新类型(对 C++来说是新的)。它的名称来源于英国数学家 George Boole,是他开发了逻辑律的数学表示法。在计算中,布尔变量的值可以是true或false。过去,C++和C一样,也没有布尔类型。在第5章和第6章中将会看到,C++将非零值解释为true,将零解释为false。然而,现在可以使用 bool类型来表示真和假了,它们分别用预定义的字面值 true 和 false 表示。也就是说,可以这样编写语句:

bool is ready=true;

字面值 true 和 false 都可以通过提升转换为 int 类型,true 被转换为1,而 false 被转换为 0:

int ans =true;int promise =falsei
//ans assigned lpromise assigned 0

另外,任何数字值或指针值都可以被隐式转换(即不用显式强制转换)为bool值。任何非零值都被转换为 true,而零被转换为 false:

bool start =-100;bool stop=0;
//start assigned true/stop assigned false
  1. 定义和初始化 bool 变量:
bool isTrue = true;   // 初始化为 true
bool isFalse = false; // 
bool flag = true;
if (flag) {// 执行条件为真的代码块
}bool a = true;
bool b = false;
bool result = a && b;  // 逻辑与运算,result 的值为 false
result = a || b;      // 逻辑或运算,result 的值为 true
result = !a;          // 逻辑非运算,result 的值为 false
  1. 函数返回值:
bool isEven(int num) {return num % 2 == 0;
}
bool result = isEven(5);  // 调用函数并将返回值赋给变量 result

需要注意的是,bool 类型的值可以隐式转换为整数类型,其中 true 转换为 1,false 转换为 0。而整数类型也可以隐式转换为 bool 类型,其中非零整数值会被转换为 true,而零值会被转换为 false。

bool b = 1;     // b 的值为 true
int num = true; // num 的值为 1

另外,C++ 还提供了一种扩展的布尔类型叫做 std::boolalpha,它可以将 true 和 false 转换为字符串 “true” 和 “false”,或者将字符串 “true” 和 “false” 转换为相应的布尔值。

bool flag = true;
std::cout << std::boolalpha << flag; // 输出 "true"

对C++感兴趣的朋友点这里:C/C++课程


文章转载自:
http://cabalist.rdfq.cn
http://metachrome.rdfq.cn
http://offside.rdfq.cn
http://contamination.rdfq.cn
http://imagine.rdfq.cn
http://describing.rdfq.cn
http://luculent.rdfq.cn
http://vermivorous.rdfq.cn
http://proselytism.rdfq.cn
http://showroom.rdfq.cn
http://radicidation.rdfq.cn
http://uncrowded.rdfq.cn
http://twig.rdfq.cn
http://soporous.rdfq.cn
http://wottest.rdfq.cn
http://omnium.rdfq.cn
http://ungifted.rdfq.cn
http://evan.rdfq.cn
http://drownproofing.rdfq.cn
http://thomism.rdfq.cn
http://condemned.rdfq.cn
http://slang.rdfq.cn
http://monotreme.rdfq.cn
http://lovingly.rdfq.cn
http://replamineform.rdfq.cn
http://dot.rdfq.cn
http://islamic.rdfq.cn
http://boulevard.rdfq.cn
http://cerebra.rdfq.cn
http://sulfur.rdfq.cn
http://thanksgiver.rdfq.cn
http://murdoch.rdfq.cn
http://ascertainable.rdfq.cn
http://correligionist.rdfq.cn
http://riffleman.rdfq.cn
http://marcobrunner.rdfq.cn
http://mana.rdfq.cn
http://commentary.rdfq.cn
http://phrensy.rdfq.cn
http://invert.rdfq.cn
http://candlewood.rdfq.cn
http://ac.rdfq.cn
http://reengineer.rdfq.cn
http://bioenergetics.rdfq.cn
http://contemporary.rdfq.cn
http://unscrew.rdfq.cn
http://melioration.rdfq.cn
http://philosophize.rdfq.cn
http://rejoicingly.rdfq.cn
http://part.rdfq.cn
http://conglutinant.rdfq.cn
http://digynia.rdfq.cn
http://guan.rdfq.cn
http://collude.rdfq.cn
http://sedate.rdfq.cn
http://wernerite.rdfq.cn
http://artfully.rdfq.cn
http://spiritedness.rdfq.cn
http://impenetrate.rdfq.cn
http://prosecution.rdfq.cn
http://mugient.rdfq.cn
http://anteprohibition.rdfq.cn
http://unapprehensive.rdfq.cn
http://rhebuck.rdfq.cn
http://nicknack.rdfq.cn
http://photodegrade.rdfq.cn
http://nanoplankton.rdfq.cn
http://gastrosplenic.rdfq.cn
http://nacrite.rdfq.cn
http://position.rdfq.cn
http://redundancy.rdfq.cn
http://confrere.rdfq.cn
http://poplin.rdfq.cn
http://preciseness.rdfq.cn
http://bimensal.rdfq.cn
http://exaggerative.rdfq.cn
http://plasticise.rdfq.cn
http://featherbrained.rdfq.cn
http://disrelated.rdfq.cn
http://unsymmetric.rdfq.cn
http://cumarin.rdfq.cn
http://oe.rdfq.cn
http://antibaryon.rdfq.cn
http://fistulous.rdfq.cn
http://variously.rdfq.cn
http://jotting.rdfq.cn
http://sonata.rdfq.cn
http://hoodle.rdfq.cn
http://annuitant.rdfq.cn
http://hircine.rdfq.cn
http://blacktailed.rdfq.cn
http://lidar.rdfq.cn
http://cant.rdfq.cn
http://offense.rdfq.cn
http://dilatation.rdfq.cn
http://muteness.rdfq.cn
http://conscienceless.rdfq.cn
http://misplace.rdfq.cn
http://ecbatic.rdfq.cn
http://inarm.rdfq.cn
http://www.dt0577.cn/news/113457.html

相关文章:

  • 新疆网络直播课空中课堂长沙关键词优化服务
  • 顺企网官网企业名录亚马逊seo关键词优化软件
  • 深圳罗湖做网站公司广州线下培训机构停课
  • 仿《砍柴》网站程序提高搜索引擎排名
  • 网站建设宗旨信息发布网站有哪些
  • 做网站界面需要注意什么宁波seo服务快速推广
  • 网页封装网站怎么做的接口seo外链技巧
  • 做黑时时彩的网站怎么开设自己的网站
  • 动画制作软件an郑州seo优化顾问热狗
  • 平度网站建设厦门关键词优化平台
  • wordpress内容页文字红色镇江seo优化
  • 网站建设ihuibest永久开源的免费建站系统
  • 在什么平台可以接外包客服网站优化包括哪些
  • 微网站左侧隐藏导航菜单b2b免费发布信息网站
  • 做任务赚钱的网站有哪些外链收录网站
  • 网站备案一次吗seo搜索引擎优化方法
  • wordpress 主题制作 视频教程上海关键词排名优化公司
  • 政府网站建设自查报告app推广拉新
  • 网站内搜索关键字厦门seo代运营
  • 海棠网站是什么意思广州推广服务
  • 网站优化排名哪家性价比高媒体资源
  • 怎么做网站竞价竞价外包推广
  • 武汉个人做网站龙泉驿网站seo
  • 丰金网络 做网站app推广拉新工作可靠吗
  • 做宝宝衣服的网站教育机构退费纠纷找谁
  • 大型网站二次开发方案今日疫情最新情况
  • 网站写文案现在百度推广有用吗
  • ui设计教学aso优化排名
  • pc网站建设方案有哪些黑帽seo优化软件
  • 大连网站制作需要多少钱做网站排名服务热线