#include #include #include void main(void){ char buff[128]; char* tokenPtr; int pos; printf("** TESTTOK1 **\n"); getchar(); memset(buff, 0, sizeof(buff)); strcpy(buff, "SHCODE=0001&SHNAME=NV-CF1&&SHTANK=12000"); printf("buff = %s\n", buff); tokenPtr = strtok(buff, "&"); while(tokenPtr != NULL){/*while*/ printf(" =>TOKEN = %s\n", tokenPtr); tokenPtr = strtok(NULL, "&"); }/*while*/ printf("**** END OF TOKEN ***\n"); getchar(); }