input a sentence string into an array

December 4, 2011 at 19:52:45
Specs: Windows 7
Lets say i have a string of "Hello My Name is John"

I want to put this data into an array such that the elements of this array are {"Hello", "My", "Name", "is", "John"}

I am using C++, and the actual problem I'm dealing with is a bit more complicated than this, but this is where I'm stuck.


See More: input a sentence string into an array

Report •

#1
December 5, 2011 at 09:45:35
Have you considered using the "C" strtok function? Here is an example:

http://www.elook.org/programming/c/...


Report •
Related Solutions


Ask Question