Last active
December 29, 2015 05:09
-
-
Save catharsis96/7619937 to your computer and use it in GitHub Desktop.
This file contains 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
//туц туц туц тыц тыц тыц | |
#include <cstring> | |
#include <cstdio> | |
#include <conio.h> | |
using namespace std; | |
int main () | |
{ | |
char str[ ] ="123-234-456.789"; | |
char * pch; | |
printf ("Splitting string \"%s\" into tokens:\n",str); | |
pch = strtok (str,"-"); | |
while (pch != NULL) | |
{ | |
printf ("%s\n",pch); | |
pch = strtok (NULL, ".-"); | |
} | |
getch(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment