#How can i split a string using only arrays?

8 messages · Page 1 of 1 (latest)

mystic pawn
#

i dont wanna use vectors

#

or sstream

mortal moon
#

iterate through the string and stop at each space

mystic pawn
mortal moon
#

two pointers

#

one marks the start of the word

#

the other the end (i.e. the end of the string or a space character)

#

extract that substring into the array