I have a std::string that contains comma separated values, i need to store those values in some suitable container e.g. array, vector or some other container. Is there any built in function through which i could do this? Or i need to write custom code for this?
I have a std::string that contains comma separated values, i need to store those
Share
If you’re willing and able to use the Boost libraries, Boost Tokenizer would work really well for this task.
That would look like: