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

随笔分类 -  c++

摘要:#include <stdio.h>#include <winsock2.h>#include <time.h>#pragma comment(lib,"ws2_32.lib")char *plays[4]={ " | ", " / ", " - ", " \\ ",};char *host;int threadnum;int startport,endport,nowport;CRITICAL_SECTION for_w;struct timeval tim 阅读全文

posted @ 2012-03-18 19:23 ccmfc 阅读(261) 评论(0) 推荐(0)

摘要:#ifndef __JRY_SOCKET_H__#define __JRY_SOCKET_H__typedef enum { SUCCESS, FAIL, I_OPEN_FAIL, I_OPENURL_FAIL, I_READFILE_FAIL, H_QUERYINFO_FAIL,}ERRORFLAGS;int JRY_WSASTARUP();int jry_open_url(char * url, char ** buf, size_t * size);char* jry_get_localip(char *);#endif#include<windows.h>#include& 阅读全文

posted @ 2012-01-17 17:36 ccmfc 阅读(233) 评论(0) 推荐(0)

摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>#include "j_socket.h"//typetypedef enum{ IP138, ITLEARNER }WEBTYPE;typedef struct __root_field__{ char city[64]; char provider[32];}root_location;typedef struct __ip138_field__{ root_location root;}ip138_field;typede 阅读全文

posted @ 2012-01-17 17:36 ccmfc 阅读(1198) 评论(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 阅读(643) 评论(0) 推荐(0)