码迷,mamicode.com
首页 >  
搜索关键字:const    ( 26295个结果
qt mvc2
继续上次的例子,对于list才说只有行,讨论列是没有意义的。 bool insertRows(int row, int count, const QModelIndex &parent); bool removeRows(int row, int count, const QModel...
分类:Web程序   时间:2014-05-27 01:25:29    阅读次数:296
C strstr() 函数
包含文件:string.h函数名: strstr函数原型:extern char *strstr(const char *str1, const char *str2);语法:* strstr(str1,str2)str1: 被查找目标 string expression to search.str...
分类:其他好文   时间:2014-05-24 06:31:32    阅读次数:230
计算出前N项的数据
#include#include#includeusing namespace std;const int N = 10;int helper(int* a,const int num1,const int num2){ int i=1; int j=1; for(int m = 0;m te...
分类:其他好文   时间:2014-05-24 06:17:01    阅读次数:222
归并排序
归并排序#define LOCAL#include#include //生成随机数c++11支持 #include #include #includeusing namespace std;int const MAX_N=10;int a[MAX_N],b[MAX_N],c[2*MAX_N];//归...
分类:其他好文   时间:2014-05-24 06:01:45    阅读次数:354
无限逼近思想
//#define LOCAL#include#includeusing namespace std;int const MAX_N=100001;int const INF=10000000;int N,M,x[MAX_N];void init(){ for(int i=0;i1) {...
分类:其他好文   时间:2014-05-19 17:20:45    阅读次数:204
找点(NYOJ891)
//#define LOCAL#include#include#include#includeint const MAX_N=101;typedef struct Point{ int x,y; bool operatorVec[i].y) { ...
分类:其他好文   时间:2014-05-19 17:08:45    阅读次数:253
第十一章 泛型算法 C++ PRIMER
vector::const_iterator result = find(vector.begin(). vector.end(),search_value); 如果查找失败,分会end() 如果有两个,会返回哪一个的迭代器?int *reauslt = find(ia,ia+6,search_va...
分类:编程语言   时间:2014-05-19 15:15:33    阅读次数:324
将数组传递给函数
1 #include 2 #include 3 using namespace std; 4 5 void modifyArray(int [], int); 6 void modifyElement(int); 7 8 int main() 9 {10 const int arr...
分类:其他好文   时间:2014-05-19 15:12:27    阅读次数:257
寻找数组中重复次数最多的数
#include#includeusing namespace std;int helper(const int a[],const int n){ map m; for(int i = 0;i::iterator comp = m.begin(); for( map::iterator it...
分类:其他好文   时间:2014-05-19 12:44:34    阅读次数:270
在O(n)时间复杂度内找到出现超过一半的数
#includeusing namespace std;bool solver(const int a[],const int n, int & num){ if(NULL == a || 0>= n) return false; ////注意,是小写~ int count = 0; ...
分类:其他好文   时间:2014-05-19 12:11:20    阅读次数:335
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!