split a string in C++

This is my favourite way to iterate through a string. You can do what you want per word.

string line = "a line of text to iterate through";
string word; istringstream iss(line, istringstream::in); while( iss >> word )
{ ... }
上一篇:Androd核心基础01


下一篇:Qt on Android 核心编程