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

c/c++ 378

#C/C++
C++胜者树

#include <iostream> #define MAX_VALUE 0x7fffffff using namespace std; //在这里我先反思一下,不知…

2015-07-01 859

#C/C++
C++自定义数组长度的快速排序

#include<stdio.h> #include<stdlib.h> /*tannnn*/ void Swap(int &a,int &…

2015-07-01 835

#C/C++
C++简单贪吃蛇实现

#include <iostream> #include <stdlib.h> #include <stdio.h> #include <…

2015-07-01 462

#C/C++
C++ KMP算法实现字符串搜索

#include<stdio.h> #define maxsize 100 typedef struct string { int n; char s[maxsize]…

2015-07-01 783

#C/C++
C++字符串操作集合

#include <iostream> using namespace std; //实现一个函数求字符串的长度。 int my_length(const char *…

2015-07-01 546

#C/C++
C++全排列实现代码

思路1——全排列的递归实现核心思想: 比如对于字符串”abc”, 第一步:求所有可能出现在第一个位置的字符即:a,b,c。 使用方法:把第一个字符和后面的b、c字符进行交换。 第二…

2015-07-01 563

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

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

2015-07-01 945

#C/C++
Windows下C++通过hook捕捉鼠标

/* * Make sure project type is windows application */ #define _WIN32_WINNT 0x0500 #include…

2015-06-29 481

#C/C++
C++简单数据加密算法实现加密和解密

/* This is a program for Encryption and Decryption This program uses the Simple Data Encry…

2015-06-29 125

#C/C++
Windows下C++通过Hooks记录键盘敲击记录

#define _WIN32_WINNT 0x0500 #include<fstream> #include<windows.h> using namesp…

2015-06-29 778

#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
1 8 9 10 11 12 32