Skip to content

Instantly share code, notes, and snippets.

@catharsis96
Last active December 29, 2015 05:09
Show Gist options
  • Save catharsis96/7619937 to your computer and use it in GitHub Desktop.
Save catharsis96/7619937 to your computer and use it in GitHub Desktop.
//туц туц туц тыц тыц тыц
#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