+ 8
How to split a string in an array using c++?
Java, Javascript, python, etc languages have split method for splitting a string into array but I am surprised that c++ doesn't have. Can anyone please explain me how can I do this. (I searched on google but I can't understand anything).
1 Réponse
+ 8
You could use the string class to get some useful methods and subclass it so you can extend with a split. It has find and substring methods.
You could parse the character array and write a split from scatch. This is how I'd do it.