Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

string split by space c++

// Extract the first token
char * token = strtok(string, " ");
// loop through the string to extract all other tokens
while( token != NULL ) {
  printf( " %s
", token ); //printing each token
  token = strtok(NULL, " ");
}
return 0;
Source by www.quora.com #
 
PREVIOUS NEXT
Tagged: #string #split #space
ADD COMMENT
Topic
Name
7+7 =