刘华世的官方博客
上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: unresolved external symbol __endthreadex错误解决在用VC6.0写程序调试时,初学者总是会遇到一些错误,针对如下错误主要是因为MFC类库没有引用所出现的问题。错误现象:nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadexnafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadexDebug/jnHid.exe : fatal error 阅读全文
posted @ 2013-03-12 17:37 pythonschool 阅读(686) 评论(0) 推荐(0) 编辑
摘要: #include "windows.h"#include "tlhelp32.h"#include "iostream"#include "string.h"/*C++实例 获取进程所在文件夹blogs to http://www.pythonschool.com/QQ群:218030155*/using namespace std;void GetProcessInfo(HANDLE hProcess, HANDLE hModule, PROCESSENTRY32* pinfo, MODULEENTRY32* m 阅读全文
posted @ 2013-02-22 16:59 pythonschool 阅读(2755) 评论(0) 推荐(0) 编辑
摘要: /********************功能:桌面滚动程序********************/#include <windows.h> //用C写windows程序,必须包含头文件//Blogs by http://www.pythonschool.comint main(){ HWND pdesk=GetDesktopWindow(); //桌面句柄,可理解为指向桌面的指针 ScrollWindow(pdesk,-100, 0, NULL, NULL);//向左移动100像素 ScrollWindow(pdesk, 100, 0, NULL, NULL)... 阅读全文
posted @ 2013-02-22 11:09 pythonschool 阅读(323) 评论(0) 推荐(0) 编辑
摘要: /*分解质因数:每个合数都可以写成几个质数相乘的形式。其中每个质数都是这个合数的因数,叫做这个合数的分解质因数。分解质因数只针对合数。分解质因数的算式叫短除法。求一个数分解质因数,要从最小的质数除起,一直除到结果为质数为止。如242┖24(是短除法的符号)2┖122┖63——3是质数,结束得出24=2×2×2×3=2^3×3(m^n=m的n次方)*/#include <iostream>using namespace std;class QualityFactor{private: int n;public: void QFContract( 阅读全文
posted @ 2013-02-21 17:40 pythonschool 阅读(15862) 评论(0) 推荐(1) 编辑
摘要: 同构数同构数是会出现在它的平方的右边的数。如5×5=25,6×6=36。例子:求1000以内的同构数#include <iostream>#include <cmath> //数学函数#define N 1000 //定义常量using namespace std; //引用名字空间//求1000以内的同构数 转自http://www.pythonschool.com/蟒蛇学校int main(int argc, char* argv[]){ long result; cout << "<------------1~100 阅读全文
posted @ 2013-02-21 12:17 pythonschool 阅读(12783) 评论(0) 推荐(0) 编辑
摘要: 一.堆排序(HeapSort)是一树形选择排序。小顶堆:K[i] <= K[2i] && k[i] <= k[2i+1]大顶堆:k[i] >= k[2i] && k[i] >= k[2i+1]2.堆排序的思想 利用大顶堆(小顶堆)堆顶记录的是最大关键字(最小关键字)这一特性,使得每次从无序中选择最大记录(最小记录)变得简单。 其基本思想为(大顶堆): 1)将初始待排序关键字序列(R1,R2....Rn)构建成大顶堆,此堆为初始的无序区; 2)将堆顶元素R[1]与最后一个元素R[n]交换,此时得到新的无序区(R1,R2,......Rn-1 阅读全文
posted @ 2013-02-21 10:47 pythonschool 阅读(287) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>using namespace std;void changeword(int number);int main(int argc, char* argv){ char number[255]; char* p; cout<<"please input a number!"<<endl; gets(number); //puts(number); p = number; for(;*p!='\0';p++) { //cout << 阅读全文
posted @ 2013-02-17 15:18 pythonschool 阅读(805) 评论(0) 推荐(0) 编辑
摘要: 最近有人问我关于这个的问题,就此写一篇blogAnsi字符串我们最熟悉,英文占一个字节,汉字2个字节,以一个\0结尾,常用于txt文本文件Unicode字符串,每个字符(汉字、英文字母)都占2个字节,以2个连续的\0结尾,NT操作系统内核用的是这种字符串,常被定义为typedef unsigned short wchar_t;所以我们有时常会见到什么char*无法转换为unsigned short*之类的错误,其实就是unicodeUTF8是Unicode一种压缩形式,英文A在unicode中表示为0x0041,老外觉得这种存储方式太浪费,因为浪费了50%的空间,于是就把英文压缩成1个字节,成 阅读全文
posted @ 2013-01-28 11:30 pythonschool 阅读(4221) 评论(1) 推荐(0) 编辑
摘要: void CAutoZipDlg::OnButton6() { // TODO: Add your control notification handler code here int iArg; //命令行参数个数 CString psz; //文件表 CString relative; //360zip相对路径 CString relative_zip; //存储zip的相对目录 CString exec_str; //命令行要执行的命令字符串 //要压缩的文件表 for( iArg = 1; iArg < __argc; iArg++ )... 阅读全文
posted @ 2013-01-28 11:30 pythonschool 阅读(735) 评论(0) 推荐(0) 编辑
摘要: /*函数名: abort功 能: 异常终止一个进程用 法: void abort(void);程序例:*/#include <stdio.h>#include <stdlib.h>int main(void){ printf("Calling abort()\n"); abort(); return 0; /* This is never reached */}/*函数名: abs功 能: 求整数的绝对值用 法: int abs(int i);程序例:*/#include <stdio.h>#include <math.h>i 阅读全文
posted @ 2013-01-07 17:07 pythonschool 阅读(382) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页
刘华世的官方博客