Posts
All the articles I've posted.
统计程序实例的个数
Published: at 10:04 AM/windows核心编程实例17-AppInst/ /展示:应用程序如何知道在任一时刻有多少个自己的实例正在运行/ include <windows.h> include "resource.h" int guMsgAppInstCountUpdate = WMAPP + 123; pragma dataseg("Shared") volatile LONG glApplicationInst...
类模板之单链表
Published: at 10:00 AM// Chain.h ifndef CHAINH define CHAINH template<class T> class ChainNode { public T data; ChainNode<T> link; }; template<class T> class Chain { public Chain(); Chain(); bool IsEmpty() const; int Length() co...
常见排序算法
Published: at 09:51 AM/插入排序/ include <iostream> using namespace std; template <class T> void SWAP(T &x, T &y) { T t; t = x; x = y; y = t; } template <class T> void Insert(T a, int n, const T x) { int i; for (i = n-1; i >= 0 && x < ai; ...
The Road Not Taken(未选择的路)
Published: at 09:58 AM原文: The Road Not Taken by Robert Frost (弗罗斯特) writen by Robert Lee Frostsai. Two roads diverged in a yellow wood, And sorry I could not travel both And be one traveler, long I stood And looked down one as far as I could To where it...
类模板之队列
Published: at 09:52 AM// Queue.h ifndef QUEUEH define QUEUEH template<class T> class Queue { public Queue(int size = 10); Queue(); bool IsEmpty() const; bool IsFull() const; T First() const; T Last() const; Queue<T>& Add(const T &x); ...
多文件统计字频
Published: at 09:48 AM假如有60个文件, 文件名为:zipin1.txt到zipin60.txt 文件格式(词语是汉字串,词频是数字): > 词语 词频 词语 词频 . . . 所有文件中的词语包括顺序都是一样的,只是词频不一样, 现在要把所有文件中相同词语的词频加起来以相同的...
对char与wchar_t一些疑惑的理解
Published: at 01:00 PM对于char和wchart我们知道前者用来存储一个字节后者可以用来存储两个字节,所以像字母数字之类的ascii编码的字符都可以用char来存储。然而,汉字是需要两个字节才能存储的,所以用wchart才能符合我们的需求。但是我们经常看到char用于一些汉字方面的处理,这样就产生了一些疑...
怎样在对话框上做一个“应用”按钮
Published: at 12:57 PM描述: 当用户打开对话框的时候“应用”按钮处于不可用状态(变灰); 当用户点击了对话框中的某个控件的时候让其处于可用状态; 当用户点击了“应用”按钮后让其变灰; 定义两个消息: define WMAPPLYTRUE WMUSER + 10 // 使应用按钮处于可用状态 define WMAPPLY...
内存文件映射-进程间通信
Published: at 12:52 PM许多应用程序会在运行过程中创建一些数据,并需要将这些数据传输给其他进程,或与其他进程共享这些数据。如果为了共享数据而必须让应用程序在磁盘上创建数据文件并把数据保存在文件中,那将非常不方便。 Microsoft意识到了这一点,并加入了相应的支持,让系统能够创建以页交...
visual studio低版本打开高版本建的工程
Published: at 12:46 PM我们都知道高版本的visual studio直接打开低版本的工程是可以的,只不过需要转换。但是低版本的打开高版本的工程是不行的,需要进行一些改动才可以,如下只试验了vs2003与vs2008,按照下面方法,如果知道其他版本信息的话应该也是可以的。 工程名:tjw 怎样用vs2003打开vs20...