摘要: 1 9.2 2 #include<iostream> 3 using namespace std; 4 int fun(int* a) 5 { 6 7 for(int i=0;i<8;i++) 8 for(int j=0;j<8-i;j++) 9 {10 int temp=0;11 if(a[j]<a[j+1])12 {13 14 temp=a[j];15 a[j]=a[j+1];16... 阅读全文
posted @ 2013-06-06 20:04 herizai 阅读(246) 评论(0) 推荐(0) 编辑
摘要: .386.model flat,stdcalloption casemap:none include windows.inc include user32.inc includelib user32.lib include kernel32.inc includelib kernel32.lib include gdi32.inc includelib gdi32.lib .data? hInstance dd ? ;模块句柄 hWinMain dd ? ;窗口句柄 hBegin dd ? ;按... 阅读全文
posted @ 2013-06-06 13:42 herizai 阅读(484) 评论(0) 推荐(0) 编辑
摘要: LONG e_lfanew; LONG signature;DWORD d;CreateFile();//跳过dos头部SetFilePointer(hFile,0x3c,NULL,FILE_BEGIN);ReadFile(hFile,&e_lfanew,4,&d,NULL);//e_lfanew存放的偏移地址SetFilePointer(hFile,o_lfanew,NULL,FILE_BEGIN);ReadFile(hFile,&signature,4,&d,NULL);printf("%04x \n",signature); 阅读全文
posted @ 2013-06-06 13:41 herizai 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 环境设置:安装完mysql vs中 vc++目录 中 包含目录 D:\DevSoft\MySQL\MySQL Server 5.5\include 这个文件夹vc++目录 中 引用目录 D:\DevSoft\MySQL\MySQL Server 5.5\lib 这个文件夹。 记得把 mysql 安装目录中的include目录下的libmysql.lib 复制到工程文件夹下。如果是32位的mysql 可以直接连。 如果是 64,需要 配置 vs x64平台,在配置管理其中,然后连。#include "stdafx.h" #include <Windows.h>#i 阅读全文
posted @ 2013-06-06 13:39 herizai 阅读(323) 评论(0) 推荐(0) 编辑
摘要: void mySort(int *b,int size);void f(){ int a[]={3,5,7,1,8,4,9}; mySort(a,sizeof(a)/sizeof(a[0]));//int *b=a}//数组是不能直接复制的//向量参数传递#include<iostream>#include<vector>#include<fstream>#include<sstream>using namespace std;typedef vector<int> VI;//typedeftypedef vector<VI&g 阅读全文
posted @ 2013-06-06 13:32 herizai 阅读(391) 评论(0) 推荐(0) 编辑