电子商务网站开发教程,上海家装口碑最好的公司,小程序退款商家不给退咋办,兰州网站优化服务【算法知识点】C11 标准引入了 auto 类型说明符。它通过变量的初始值或者表达式中参与运算的数据类型来推断变量的类型。 一、for(auto iter:vec) 的典型用法
#include bits/stdc.h
using namespace std;int main(){string s;cins;for(auto t:s){cout…【算法知识点】C11 标准引入了 auto 类型说明符。它通过变量的初始值或者表达式中参与运算的数据类型来推断变量的类型。 一、for(auto iter:vec) 的典型用法
#include bits/stdc.h
using namespace std;int main(){string s;cins;for(auto t:s){couttendl;}return 0;
} /*
in:abc
out:
a
b
c
*/
二、for(auto iter:vec) 的典型用法
#include bits/stdc.h
using namespace std;int main(){string s;cins;for(auto t:s){tt-32;}for(auto t:s){couttendl;}return 0;
} /*
in:
abcout:
A
B
C
*/
【参考文献】https://blog.csdn.net/m0_72542983/article/details/128840788