摘要:#include #include #include //access() #include //创建多级目录 int createMultiLevelDir(char* sPathName) { char DirName[256]; int i, len; strcpy(Di...
阅读全文
posted @ 2014-04-19 21:17
cosail
随笔分类 - Linux C
摘要:#include #include #include //access() #include //创建多级目录 int createMultiLevelDir(char* sPathName) { char DirName[256]; int i, len; strcpy(Di...
阅读全文
posted @ 2014-04-19 21:17
摘要:#include #include //strrchr(), strncpy()#include //realloc()#include //readlink()#define MAXBUFSIZE 1024//通过链接文件名获取被目标文件绝对路径//为了防止buffer不够大,包...
阅读全文
posted @ 2014-04-19 19:03
摘要:#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
摘要:#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
|