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.
2022-07-20
在牛客打卡2天,今天学习:刷题 4 道/代码提交 15 次
全部评论

相关推荐

09-01 21:40
已编辑
同济大学 Java
点赞 评论 收藏
分享
真的很糟糕:不一定是你的问题,当然你也可以做的更好一些,继续投相信自己一定会有的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务