随笔分类 - c/c++/java
摘要:string cookie=NULL,headers; char post[],result[]; string ssq=""; string url="http://kaijiang.zhcw.com/zhcw/html/ssq/list_1.html"; ResetLastError(); in
阅读全文
摘要:#include #include #include #include #include #include #define len 15 int chessmessage[len][len]; int worb = 2; int count = 0; int m; void star_print(); //打印游戏开始函数 void movegb(char key); //光标的移动 ...
阅读全文
摘要:#include #include #include #include #include struct rcd;//声明节点结构 typedef struct rcd* Record;//节点指针别名 typedef struct rcd record;//节点别名 #define MAXIMUS 15 //定义棋盘大小 int p[MAXIMUS][MAXIMUS];//存储对局...
阅读全文
摘要:#include #include #include #include #include #include const int H = 8; //地图的高 const int L = 16; //地图的长 char GameMap[8][16]; //游戏地图 int key; //按键保存 int sum = 1, over = 0; //蛇的长度, 游戏结束(自...
阅读全文
摘要://文件的读取 这部分是获取命令行参数来读取 int ch; FILE *fp; unsigned long count = 0; if(argc!=2) { printf("没有参数\n"); exit(EXIT_FAILURE); } if((fp=fopen(argv[1],"r"))==NULL...
阅读全文
摘要:#include #include #include static unsigned long int next = 1; unsigned int rand0(); void srand1(unsigned int seed); int main() { int count; unsigned int seed; while(scanf("%u",&seed)=...
阅读全文
摘要:int main() { char *str = "see you later"; int r = strlen(str); char * p = str; int a= 0; while(*str++!='\0') { if(*str == ' ') { a++; } ...
阅读全文
摘要:char * cyp(char *s1,char *s2) { char *p = NULL; char *q = NULL; char *q1 = NULL; while(*s1!='\0') { if(*s1==*s2) { p = s1; q = s1; ...
阅读全文
摘要:void charu(int x[],int w[],int b,int op); int main() { int arr[5] = {20,80,88,98,179}; int ar[6]; int i,b=50; int c; c = sizeof(arr)/sizeof(arr[0]); charu(arr,ar,b,c); ...
阅读全文
摘要:int arr[8]={12,53,71,9,6,3,4,8}; int i,j,t; for(j=0;jarr[i+1]) { t = arr[i]; arr[i]=arr[i+1]; arr[i+1]=t; } } ...
阅读全文
摘要:int arr[4][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}}; int i,j; int ar[4][4]; for(i=0;i<4;i++) { for(j=1;j<4;j++) { ar[i][0]=arr[0][i]; ...
阅读全文
摘要:int a=1,b=1; while(a++) { b = a*4-303; if(a*5==a+b+303&&b>0&&(a*5)%7==0&&b%((a*5)/7)==0)//&&b%7==0&&b>0) { printf("总数 = %d\n a = %d\n b = %d\n c = %d",a*5,...
阅读全文
摘要:int x[20]={0}; int y[20]={0}; int a;//层数 printf("请输入杨辉三角形的层数:"); scanf("%d",&a); int i,j,k; for(i=0;i<a;i++) { if(i == 0) { x[i]=1; ...
阅读全文
摘要:int main() { int a; int arr[10]={0}; printf("请输入一个数:"); scanf("%d",&a); while(a!=1&&a!=145) { printf("现在的数是%d->",a); int i = 0; while(a > 0) { ...
阅读全文
摘要:void TRACE(LPCTSTR lpszFmt, ...) { va_list args; va_start(args, lpszFmt); int len = _vsctprintf(lpszFmt, args) + 1; TCHAR *lpszBuf = (TCHAR*)_alloca(len*sizeof(TCHAR));//栈中分配, 不需要释放 ...
阅读全文
摘要://从一个文件中读取数据到内存,然后再把内存中的数据写入另外一个文件 #include "stdafx.h" #include int filelength(FILE *fp); int _tmain(int argc, _TCHAR* argv[]) { FILE *fp = NULL; FILE *fp2 = NULL; int FpSize = 0; fopen_s(&fp,...
阅读全文
摘要:知识点: l 认识sockets(套接字) l 加载套接字库 l 绑定端口 l 监听 l 收发信息 l 关闭套接字 一、认识sockets(套接字) Sockets是一个Windows网络编程的规范,sockets(套接字)编程有三种: 1、流式套接字(SOCK_STREAM) 2、数据报套接字(S
阅读全文
摘要:CString GetHttpFileData(CString strUrl) { CInternetSession Session(_T("Internet Explorer"), 0); CHttpFile *pHttpFile = NULL; CString strData; CString strClip; pHttpFile = (CHttpFi...
阅读全文

浙公网安备 33010602011771号