码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
list<> 中find的使用
昨天要在 std::list 中判断是否存在某一字符串 std::string 。我首先想先迭代+std::string自带的"==" 判断,也就是 list listStr; string s1; for(vector::iterator itr=lis...
分类:其他好文   时间:2014-06-15 23:55:32    阅读次数:386
SQLite学习手册(实例代码<一>)
一、获取表的Schema信息: 1). 动态创建表。 2). 根据sqlite3提供的API,获取表字段的信息,如字段数量以及每个字段的类型。 3). 删除该表。 见以下代码及关键性注释:1 #include 2 #include 34 using namespace std;56 void doT...
分类:数据库   时间:2014-06-15 22:32:17    阅读次数:282
tyvjP1003越野跑(水)
越野跑描述 Description为了能在下一次跑步比赛中有好的发挥,贝茜在一条山路上开始了她的训练。贝茜希望能在每次训练中跑得尽可能远,不过她也知道农场中的一条规定:奶牛独自进山的时间不得超过M秒(1 using namespace std;int main(){ int m,t,u,f,d...
分类:其他好文   时间:2014-06-15 21:37:45    阅读次数:199
随意输入N个英文字符,找出其中最长连续的排列。
intout_max_length_crease_str(constchar*p,std::vector&vct){ vct.clear(); intnlen=strlen(p); if(nlen==0){ return0; } if(nlen==1){ vct.push_back(p); r...
分类:其他好文   时间:2014-06-15 21:01:04    阅读次数:178
HDU 2813
http://acm.hdu.edu.cn/showproblem.php?pid=2813裸二分图最优匹配,需要用两个map把武将名字映射到点的序号上#include #include #include #include using namespace std;const int N=210;co...
分类:其他好文   时间:2014-06-15 17:21:24    阅读次数:179
dfs1321
比较抽象吧,看到题时一点思想也没有,参考了别人的代码才知道。。。渣渣#include #include #include #include using namespace std;int map[10][10];int v[10];//作用重大int n,k,num;void dfs(int r,i...
分类:其他好文   时间:2014-06-15 07:18:09    阅读次数:166
poj2524(简单并查集)
#include #include #include #include using namespace std;int n,m;int bin[50001];int findx(int x){ int r=x; while(r!=bin[r]) r=bin[r]; int j=x,k; while(...
分类:其他好文   时间:2014-06-15 00:17:10    阅读次数:323
C++中cin流的简单使用
cin流可以用于读取标准输入流的一个字符,一行字符包含空格,多行字符等,示例如下: #include using std::cout; using std::endl; using std::cin; int main(void){ const int maxlength=100; char text[maxlength]={0}; char test=0; //...
分类:编程语言   时间:2014-06-14 07:46:55    阅读次数:321
C++String类关键操作简介
1.string 类的头文件 #include using std::string; 2.string 类的构造函数 string s1; //默认的构造函数,s1为空串 string s2(s1); //将s2初始化为s1的一个副本,对s2的操作不会影响s1 string s3("value"); //将s3初始化为一个字符串字面值的副本 string s4(n,'c'); /...
分类:编程语言   时间:2014-06-13 21:57:28    阅读次数:394
C++ HUSTR与两个版本的HUMAP实现
/* hustr是一个我使用很方便的字符串类,管理使用很方便, 新的humap支持多级存储各种信息,使用及其方便 旧的humap只支持字符串存储,使用方法一样 */ #include #include #include #include #include #include #include using namespace std; void erre...
分类:编程语言   时间:2014-06-13 20:47:08    阅读次数:351
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!