1、C++字符串分割:
vector<string> pathToVector(string thePath) //对string路径按进行分割
{
stringstream ss(thePath);
string tmp;
vector<string> result;
while (getline(ss, tmp, ))
result.emplace_back(tmp);
return result;
}
2、C++ 11对的push_back, push_front, insert 增加了新的用法,与之对应的是emplace_back,emplace_front, emplace.
vector<string> pathToVector(string thePath) //对string路径按进行分割
{
stringstream ss(thePath);
string tmp;
vector<string> result;
while (getline(ss, tmp, ))
result.emplace_back(tmp);
return result;
}
2、C++ 11对的push_back, push_front, insert 增加了新的用法,与之对应的是emplace_back,emplace_front, emplace.
2022-07-20
在牛客打卡2天,今天学习:刷题 4 道/代码提交 15 次
全部评论
相关推荐
书海为家:我来给一点点小建议,因为毕竟还在学校不像工作几年的老鸟有丰富的项目经验,面试官在面试在校生的时候更关注咱们同学的做事逻辑和思路,所以最好在简历中描述下自己做过项目的完整过程,比如需求怎么来的,你对需求的解读,你想到的解决办法,遇到困难如何找人求助,最终项目做成了什么程度,你从中收获了哪些技能,你有什么感悟。 点赞 评论 收藏
分享
