int main( void ) { char string[] = "A string\tof ,,tokens\nand some more tokens"; char seps[] = " ,\t\n"; char *token;
printf( "Tokens:\n" );
// Establish string and get the first token: token = MyToken( string, seps ); // C4996 // Note: strtok is deprecated; consider using strtok_s instead while( token != NULL ) { // While there are tokens in "string" printf( "%s\n", token );
// Get next token: token = MyToken( NULL, seps ); // C4996 } } typedef int BOOL; #define TRUE 1 #define FALSE 0