Skip to content

Instantly share code, notes, and snippets.

@hostelix
Created June 3, 2016 20:16
Show Gist options
  • Select an option

  • Save hostelix/e4c9af3a0cdb2e3196337abb0051ceb5 to your computer and use it in GitHub Desktop.

Select an option

Save hostelix/e4c9af3a0cdb2e3196337abb0051ceb5 to your computer and use it in GitHub Desktop.
Funcion split para c++
typedef std::vector<char *> Vstring;
Vstring split(char *cadena_str, char *delimitador){
Vstring vector_tmp;
char *pch;
pch = strtok(cadena_str, delimitador);
while(pch != NULL){
vector_tmp.push_back(pch);
pch = strtok(NULL, delimitador);
}
return vector_tmp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment