码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
【C语言】模拟实现strchr函数.即在一个字符串中查找一个字符第一次出现的位置并返回
//模拟实现strchr函数.即在一个字符串中查找一个字符第一次出现的位置并返回 #include //#include #include char* my_strchr(char *dst, char src) { assert(dst); while (*dst != '\0') { if (*dst == src) return dst; dst++; } re...
分类:编程语言   时间:2015-07-02 10:04:18    阅读次数:113
【C语言】模拟实现库函数srtcpy函数
//模拟实现库函数srtcpy函数 #include #include char * my_strcpy(char *dst, const char *src) { char *start = dst; assert(dst); assert(src); while (*dst++ = *src++) { ; } return start; } int main() { c...
分类:编程语言   时间:2015-07-02 10:03:11    阅读次数:172
【C语言】实现一个函数求字符串长度(不能创建第三方变量)
//实现一个函数求字符串长度(不能创建第三方变量) #include #include int my_strlen(const char *p) { assert(p); if (*p == '\0') return 0; else return 1 + my_strlen(++p); } int main() { char *p = "abcdefg"; printf("%...
分类:编程语言   时间:2015-07-02 10:03:04    阅读次数:113
【C语言】模拟实现库函数strcat函数
//模拟实现库函数strcat函数 #include #include #include char * my_strcat(char *dst, const char *src) { char *start = dst; int len_dst = strlen(dst); dst+=len_dst; while (*dst++ = *src++) { ; } return...
分类:编程语言   时间:2015-07-02 10:02:50    阅读次数:166
POJ 1659 Frogs' Neighborhood(度序列组成)
意甲冠军 中国依据Havel-Hakimi定理构图即可咯 先把顶点按度数从大到小排序 可图的话 度数大的顶点与它后面的度数个顶点相连肯定是满足的 出现了-1就说明不可图了#include#include#includeusing namespace std;const int N = 20;int ...
分类:其他好文   时间:2015-07-02 10:00:07    阅读次数:125
artTemplate子模板include
有多少人一直被官网,这坑坑的讲解所迷或不废话,直接上demodemo1: demo2: 这是一个神奇的世界,需要神奇的人去发现新大陆!
分类:其他好文   时间:2015-07-02 09:57:04    阅读次数:222
基于google protobuf 的 socket udp 通信
SocketClient.cpp#include "SocketClient.h"#include "ClientInfoSave.h"#include "serverMsg.pb.h"using namespace Message;string SocketClient::m_strHeatMsg...
分类:其他好文   时间:2015-07-02 07:38:24    阅读次数:481
POJ 1149 PIGS ( 网络流 )
主要是建图有些小烦,若几个节点流量的来源或者去向完全相同,且流量为 INF,将它们合并成一个节点。 若从两点间有且仅有一条容量为 INF 的边,将两点合并成一个节点。 #include #include #include using namespace std; const int INF = 0x7fffffff; const int MAXN = 110; int capac...
分类:其他好文   时间:2015-07-02 06:37:10    阅读次数:127
mongodb 分组查询
数据的保存include_once 'mDB.class.php';$m=new mDB();$m->setDB('mydb');// $m->save('stu',['dept'=>'财务','name'=>'张三','age'=>73]);// $m->save('stu',['dept'=>'...
分类:数据库   时间:2015-07-02 06:34:19    阅读次数:234
IO复用_select函数
select函数:#include #include #include #include int select(int nfds, fd_set*readfds, fd_set*writefds, fd_set*ex...
分类:其他好文   时间:2015-07-02 06:28:32    阅读次数:228
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!