当前位置:网站首页>*Write a program to initialize a string object with a vector < char> container*/
*Write a program to initialize a string object with a vector < char> container*/
2022-06-30 03:01:00 【qq_ fifty-eight million seven hundred and thirty-six thousand t】
int main(void)
{
vector<char> cstr; char c;
string str;
while (cin >> c)
{
cstr.push_back(c);
}
str.assign(cstr.begin(),cstr.end());
cout << str;
return 0;
}
边栏推荐
- Unity timeline data binding
- What is the metauniverse: where are we, where are we going
- 如何在 JupyterLab 中把 ipykernel 切换到不同的 conda 虚拟环境?
- Wechat applet +php to realize authorized login operation
- 公司电脑强制休眠的3种解决方案
- 并发请求下如何防重复提交
- 怎么使用Vant实现数据分页和下拉加载
- What kind of foreign exchange trading platform is regulated and safe?
- Formal and actual parameters, value passing and address passing
- Uniapp address translation latitude and longitude
猜你喜欢

What is the difference between a layer 3 switch and a layer 2 switch

Use compose to realize the effect of selecting movie seats by panning tickets

约瑟夫环 数学解法

Study diary: February 15, 2022

Distributed file system fastdfs

Heavy attack -- ue5's open source digital twin solution

【实战技能】如何撰写敏捷开发文档

High paid programmers & interview questions series 63: talk about the differences between sleep (), yield (), join (), and wait ()

Uniapp address translation latitude and longitude

Raki's notes on reading paper: discontinuous named entity recognition as maximum clique discovery
随机推荐
mysql 主从数据库同步失败的原因
2.8 【 weight of complete binary tree 】
2022 the action of protecting the net is imminent. Things about protecting the net
怎样的外汇交易平台是有监管的,是安全的?
&nbsp; Difference from spaces
浅谈IDEA的优化和使用
Tri rapide, index groupé, recherche de la plus grande valeur K dans les données
What is the metauniverse: where are we, where are we going
Summary of interview and Employment Questions
What is the difference between a layer 3 switch and a layer 2 switch
&nbsp;与空格的区别
Raki's notes on reading paper: Leveraging type descriptions for zero shot named entity recognition and classification
How to modify and add fields when MySQL table data is large
(graph theory) connected component (template) + strongly connected component (template)
Prompt learning a blood case caused by a space
What is the concept of string in PHP
Intel-Hex , Motorola S-Record 格式详细解析
DC/DC变换器轻载时三种工作模式的原理及优缺点
HTA入门基础教程 | VBS脚本的GUI界面 HTA简明教程 ,附带完整历程及界面美化
一篇文章带你入门vim