#include <iostream>
#include <string>
using namespace std;
int main()
{
char str1[] = "a b c d e f";
char str2[] = "가,나,다,라,마,바";
char str3[] = "1,2-3;4 5";
char* context;
char* tok1 = strtok_s(str1, " ", &context);
while (tok1 != NULL)
{
cout << tok1 << endl;
tok1 = strtok_s(context, " ", &context);
}
tok1 = strtok_s(str2, ",", &context);
while (tok1 != NULL)
{
cout << tok1 << endl;
tok1 = strtok_s(context, ",", &context);
}
tok1 = strtok_s(str3, ",-; ", &context);
while (tok1 != NULL)
{
cout << tok1 << endl;
tok1 = strtok_s(context, ",-; ", &context);
}
return 0;
}