![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
@诸葛不亮
不了解中医的心理学爱好者不是好程序猿
展开
-
c++ 中 bool 与整型之间的转换
c++ 中 bool 与整型之间的转换在c++中bool类型与整型之间存在着隐式转换,bool在存储之后隐式的转换为整型存储,其中true为1,false则为0。如果用整型给bool对象赋值,非零值为true,0则为false。#include <iostream>using namespace std;int main(){ bool t = true; ...原创 2019-03-09 14:13:38 · 21461 阅读 · 0 评论 -
for_each、lambda、array的简单使用
程序源代码#include <iostream>#include <array>#include <utility>//for lambda#include <vector>#include <string>#include <algorithm>//for_eachusing namespace std;...原创 2019-03-09 14:30:14 · 141 阅读 · 0 评论