设为首页 加入收藏

TOP

C++ string自定义辅助方法汇总
2017-08-10 10:22:38 】 浏览:3903
Tags:string 定义 辅助 方法 汇总
split方法
#include 
  
   
#include 
   
     #include 
    
      using namespace std; void split(string s, char delim, vector
     
      & nodes) { string temp; stringstream ss(s); while(getline(ss, temp, delim)) { nodes.push_back(temp); cout << temp << endl; } } int main() { string s = "//abc/./../c"; vector
      
        nodes; split(s, '/', nodes); return 0; }
      
     
    
   
  
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇C/C++实现strcpy和strcat两个功能 下一篇C++ string相关函数

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目