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

c/c++ 378

#C/C++
C++排序(小堆排序)

#include<iostream> #include<string> using namespace std; template<class Typ…

2015-08-12 999

#C/C++
C++排序(快速排序)

#include <iostream> #define _SZ 10 using namespace std; template<typename _Ty>…

2015-08-12 702

#C/C++
C++字典的线性表实现

#include <iostream> #include <assert.h> using namespace std; struct SchoolNo {…

2015-08-12 816

#C/C++
C++中bitset的实现(引用类的使用)

#include <iostream> #include <string.h> #define CHAR_BIT 8 using namespace std…

2015-08-12 688

#C/C++
C++快速排序(随机值元法)

#include <iostream> #include <stdlib.h> using namespace std; int sum(int a,int…

2015-08-12 361

#C/C++
C++对文本里面的大量数据进行排序(shell,c++,fopen,awk,sed)

#/bin/bash #对文本里面的数据进行排序 awk 'BEGIN{ RS="," } {print $0} END{ }'<a | sort -n …

2015-08-12 703

#C/C++
C++内存检测(定位到确定地址,并且用hash表来保存提高了搜索效率)

#include <iostream> #include <malloc.h> #include <string.h> #include <…

2015-08-12 256

#C/C++
获取IOS设备类型名

- (NSString*)deviceString { // 需要#import "sys/utsname.h" struct utsname systemIn…

2015-08-11 164

#C/C++
iOS 获取当前Wifi的SSID

首先添加框架:SystemConfiguration.framework #import <SystemConfiguration/CaptiveNetwork.h> …

2015-07-29 458

#C/C++
KMP字符串查找算法

KMP算法的重点是寻找next数组,程序如下: #include <iostream> #include <string> #include <vec…

2015-07-27 806

#C/C++
C语言调用mysql的存储过程

下面假设有一张sc表,保存学生选课记录,有课程号,学号,平时分,卷面分,总分。 建立数据库表过程: create table class( cno varchar(8) not n…

2015-07-22 529

#C/C++
字典树的应用 单词意义查找-C语言实现

实现根据单词快速找到对应的解释 /* 字典树应用,快速单词查找 */ const int M = 1000000; char word[1000000][11]; int wp; …

2015-07-17 620
1 3 4 5 6 7 32