Original Post
// tokenize
while( index != string::npos ){
// push word
string::size_type next_space = m_commandLine.find(' ');
arguments.push_back(m_commandLine.substr(index, next_space) );
// increment index
if( next_space != string::npos )
index = next_space + 1;
else
break;
}