Public paste
Undefined
By: Guest | Date: Apr 28 2009 15:52 | Format: None | Expires: never | Size: 233 B | Hits: 900

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main ()
  5. {
  6.   char str[] = "username:password";
  7.   char * pch;
  8.  
  9.   pch = strtok(str, ":");
  10.  
  11.   while (pch != NULL)
  12.   {
  13.     printf ("%sn",pch);
  14.     pch = strtok (NULL, ":");
  15.   }
  16. }