摘要:
#include #include int use_strtok(){ char str[] = "192.168.1.222"; char* token[4] = {}; token[0] = strtok(str, "."); //第一次调用strtok(), 第一个参数是要取词的字符串 ... 阅读全文
posted @ 2014-04-08 22:54
cosail
阅读(206)
评论(0)
推荐(0)
|
摘要:
#include #include int use_strtok(){ char str[] = "192.168.1.222"; char* token[4] = {}; token[0] = strtok(str, "."); //第一次调用strtok(), 第一个参数是要取词的字符串 ... 阅读全文
posted @ 2014-04-08 22:54
cosail
阅读(206)
评论(0)
推荐(0)
摘要:
#include #include #include //atoi(), 这里用不了itoa()函数(不属于标准)//字符串形式到整数形式int IP_str2int(const char *IP){ char* token = NULL; int intIP = 0; char strIP[16... 阅读全文
posted @ 2014-04-08 22:48
cosail
阅读(1640)
评论(0)
推荐(0)
|