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

c/c++ 378

#C/C++
快速排序算法的C语言实现

#include <stdlib.h> #include <stdio.h> static void swap(void *x, void *y, size…

2015-01-06 993

#C/C++
C扩展库中回调Python函数

// c 程序 段 static PyObject *gc_before_extract = NULL; /// 设置回调 static PyObject * SetBeforeC…

2015-01-06 181

#C/C++
数学表达式计算器

1+2/3*(4-6)*6/8+9*2 = ? #include <stdio.h> #include <stdlib.h> #define MAXSIZE…

2015-01-06 137

#C/C++
C代码实现Linux下模拟ping命令

/******************************************************** * IP报头格式数据结构定义在<netinet/ip.h&…

2015-01-05 813

#C/C++
C++连接MYSQL数据库

//下面的代码是一个实现C++连接MYSQL数据库的很好的例子 //这里用了建表,插入,检索,删表等常用功能 //我用VC++6.0生成,已经成功连接了。 //在VC++6.0中要…

2015-01-04 165

#C/C++
C++ 计算n天后的日期

#include <iostream> class CDate { private: int m_nDay; // Range: 1 - 30 (lets assume…

2015-01-04 341

#C/C++
关键路径算法C++实现代码

#include <dos.h> #include <conio.h> #include <stdio.h> #include <stdl…

2015-01-04 154

#C/C++
DES加密算法C++实现

#include <stdlib.h> #include <stdio.h> #include <string.h> #define ENCRY…

2015-01-04 407

#C/C++
C++ 俄罗斯方块实现代码

#include <windows.h> #include <stdio.h> #include <time.h> #define CELL 2…

2015-01-04 645

#C/C++
汉落塔算法实现代码

用 4 根柱子移动盘子n 是盘子个数,编号从1 到 nFirst 是源柱子号Second Third 是两根过渡柱Fourth 是目标柱 汉落塔算法 #include <st…

2015-01-04 119

#C/C++
Dijkstra算法

#include <iostream> #include <vector> using namespace std; struct Line { int V…

2015-01-04 934

#C/C++
C++操作sqlite3数据库示例代码

一个简单的使用sqlite3数据库的电话薄,很简单适合初学者看看,而且里面并没有很多容错处理很容易看懂的。 #include<stdio.h> #include&quo…

2015-01-04 641