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-19 13:59
门头沟学院 Java
用微笑面对困难:Trae一下,如果真成了,他用了直接发字节起诉代码版权,,这个代码不商用是没问题的如果没成也是情理之中的。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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