Created
June 3, 2016 20:16
-
-
Save hostelix/e4c9af3a0cdb2e3196337abb0051ceb5 to your computer and use it in GitHub Desktop.
Funcion split para c++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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