I have String vector that has data set look like below.
vector<string> result;
<index> | <Name> | <email> | <status>
1|duleep|dfe@gamil.com|0
2|dasun|dasun@da.com|0
3|sampath|lkdf@dg.lk|1
4|Nuwan|Kandyjkj@lkj.com|0
now i want to get separate vector data(Name, Index,Status) please suggest best way to do this using C++(how can i convert to string array[4][4]?)
Here is an example I came up with using boost::tokenizer (if you don’t want to use boost, then sorry):
If you want to use
std::string array[4][4], just iterate through the tokens and assign them to your array.Here is another way without boost: