首页 软件开发 代码片段 c/c++ ( Page 10 )

c/c++ 378

#C/C++
c++ 获取操作的精确时间

有很多时候为了测试效率问题,我们需要对时间的精确掌控,mfc给我们封装的时间函数就满足不了我们的需求了。 这时候需要使用下面两个函数 BOOL QueryPerformanceFr…

2015-07-01 945

#C/C++
C++扫描系统进程代码

自己一直想做一个和windows资源管理器一样的程序,所以看了一下如何列举系统的所有进程。主要用到几个函数 CreateToolhelp32Snapshot,Process32Fi…

2015-07-01 793

#C/C++
C语言递归算法求某一数在数组中出现的次数

int times(int searchNum, int arr[], int length) // length 是数组元素个数,searchNum是要查找的值 { int nu…

2015-07-01 993

#C/C++
C语言按层次遍历二叉树算法

#define MaxSize 1000 typedef char ElemType; typedef struct node { ElemType data; struct no…

2015-07-01 350

#C/C++
C++红黑树的实现

最近在阅读SGI STL源代码,其中红黑树的实现比较有技术含量,但标准库里面是捆绑了其中的allocator, iterator(Rb_tree专用的),使用很多模板变量,实现对多…

2015-07-01 941

#C/C++
VC++实现获取进程端口检测木马

我们都知道病毒木马都要与外面通信,如何检测呢,今天我们来时间检测进程端口来检测木马 #include <windows.h> #include <Tlhelp32…

2015-07-01 186

#C/C++
C++用回溯方法做全排列

#include<cstring> #include<iostream> #define LEN 10 using namespace std; char …

2015-07-01 369

#C/C++
C++获取本机IP地址列表

/* * main.c * ---------------------------------------------- * 2013-01-09 chrisniu1984@gma…

2015-06-29 724

#C/C++
C++判断某天是一年中的第几天

#include "stdio.h" struct date { int y; int m; int d; }; void main() { date da; …

2015-06-29 548

#C/C++
C++清空或删除文件夹

//清空log文件夹 void CPMAgentManageDlg::DeleteFolder(CString sPath) { CFileFind ff; BOOL bFound…

2015-06-29 636

#C/C++
C++编写的页面淘汰算法LRU

C++编写的页面淘汰算法LRU //FIFO #include<iostream> #include<iomanip> using namespace st…

2015-06-29 872

#C/C++
C++编写的页面淘汰算法FIFO

C++编写的页面淘汰算法FIFO //FIFO #include<iomanip> #include<iostream> using namespace s…

2015-06-29 382
1 8 9 10 11 12 32