Contoh:
string d = "Ahmad 54 34 45";
vector result;
split(d,'\t',result);
vector
stringstream ss(s);
string item;
while(std::getline(ss, item, delim)) {
elems.push_back(item);
}
return elems;
}
Rujukan:
1. http://stackoverflow.com/questions/236129/how-to-split-a-string
No comments:
Post a Comment