Hi everyone,
How do I split a string like this
"500 57 - 33 + 17 * 22 -"
into an array of strings
"500" "57" "-" "33" ..
What function can do that for me?
Printable View
Hi everyone,
How do I split a string like this
"500 57 - 33 + 17 * 22 -"
into an array of strings
"500" "57" "-" "33" ..
What function can do that for me?
Yes. strtok() for example. sscanf() could also be used with some thinking about it.
--
Mats
It should also be quite simple with stringstream and operator >>.