// STRTOK

#include <iostream>
#include <string.h>

using namespace std;

int main()
{
  char numbers[13] = "first,second";
  char first[6] = "";
  char second[7] = "";
  char *ptr;

  cout << numbers << endl;

  ptr = strtok ( numbers, "," );

  strcpy(first, ptr);

  ptr = strtok ( NULL, "," ); // Note NULL on second call

  strcpy(second, ptr);

  cout << first << endl;
  cout << second << endl;

  // Modified variable
  cout << numbers << endl;

  return 0;
}

// OUTPUT
// first,second
// first
// second
// first

// EOF