2014年3月11日

C++ 拆分字符串-copy()

摘要: c++拆分字符串方法:#include #include #include #include #include int main() {using namespace std;string sentence = "Something in the way she moves...";istringstream iss(sentence);copy(istream_iterator(iss),istream_iterator(),ostream_iterator(cout, "\n"));}你也可以将分割后的字符串复制到vector内:vector tok 阅读全文

posted @ 2014-03-11 18:21 雪 狼 阅读(655) 评论(0) 推荐(0)

导航