博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年12月7日

摘要: char* ip_long2str(const unsigned long ip, char *pDest){ unsigned char pTmp[4]={0};*(unsigned int*)pTmp=ip; sprintf(pDest, "%d.%d.%d.%d", *(pTmp+0),*(pTmp+1),*(pTmp+2),*(pTmp+3));return pDest;}int ATOI(const char *pSrc, const int size, unsigned char *iDest){ int i=0;while(*(pSrc+i) &&am 阅读全文

posted @ 2011-12-07 17:57 ccmfc 阅读(609) 评论(0) 推荐(0) 编辑

摘要: #include <iostream>using namespace std;#define MAX_MUL_SIZE 256#define MUL_SPRINTF 1#define MUL_FRINED 1#define DELETE(p) \{\ if(p)\{\ delete(p);\ p=NULL;\}\}#define NEW_SET(p,ch,size) \{\ p=new char[size];\ memset(p, ch, size);\}#define CLS_STRCH(p) \{\ if(back_strch(p, '.'))\{\ cls_b 阅读全文

posted @ 2011-12-07 15:56 ccmfc 阅读(640) 评论(0) 推荐(0) 编辑