1)
string str[n]={"hello", ...};
vector<string> strArray(str,str+n);
2)
vector<string> strArray;
strArray.push_back("hello");
strArray.push_back("world");
1)
string str[n]={"hello", ...};
vector<string> strArray(str,str+n);
2)
vector<string> strArray;
strArray.push_back("hello");
strArray.push_back("world");
上一篇:c++ accumulate
原文量类型,它可以容
vector 和deque
为什么在3.1的reserve实现中,我使用了赋值重载,而没有使用
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M