码迷,mamicode.com
首页 >  
搜索关键字:const char p    ( 57984个结果
sqlite 二进制字段 (zz)
有时我们用数据库存储文件,需要用到二进制字段,下面列常用方法。 1.写二进制数据 sqlite3 * db; int result; char **errmsg =NULL; result = sqlite3_open("test.db", &db ); if( result != SQLITE_O...
分类:数据库   时间:2014-05-14 02:45:00    阅读次数:371
杭电 2000
#include using namespace std;#define MAXN 4int main(){ //char arr[MAXN] = {0}; char arr[MAXN]; memset(arr,0,MAXN); while (cin >> arr) {...
分类:其他好文   时间:2014-05-14 02:32:38    阅读次数:327
cout输出字符串指针
先给出通过字符型指针输出字符串的示例代码,如下:#include using std::cout;using std::endl; int main(){ const char *pszStr = "this is a string"; // 输出字符串 cout int ma...
分类:其他好文   时间:2014-05-14 01:33:08    阅读次数:247
linux 下消息队列发送后没有信息
在使用消息队列时,调用#include #include #include #include #include #include struct mymsg{ long mytype; char even[32];};#define VALUE (key_t)0x1fffint main(){ ...
分类:系统相关   时间:2014-05-14 00:48:02    阅读次数:487
最小生成树-Prim算法
【问题】 求一个给定的加权连通图的最小生成树问题。 【代码】 #include #include #define MAXNUM 1000 #define MAX_VERTEX_NUM 20 typedef char Vertextype; typedef struct node { int weight; }Adjmatrix[MAX_VERTEX_NUM][MAX_VERT...
分类:其他好文   时间:2014-05-13 23:55:49    阅读次数:464
LoadRunner函数示例:lr_paramarr_random()
lr_paramarr_random()函数的作用为:从一个参数数组中随机抽取一个值并以字符串形式返回。其使用方式及返回方式如下:char * lr_paramarr_random( const char * paramArrayName);该函数在某些测试场景下或许比较有用,如随机选择页面中一.....
分类:其他好文   时间:2014-05-13 22:55:18    阅读次数:505
零长数组
在看Linux内核的路由代码时,发现有如下的结构体定义: 1 struct fib_table { 2 unsigned char tb_id; 3 unsigned tb_stamp; 4 int (*tb_lookup)(struct fib_table *tb, co...
分类:其他好文   时间:2014-05-13 22:32:41    阅读次数:458
poj 1423 Big Number
1 /** 2 斯特林(Stirling)公式: 3 4 求 n! 的位数 5 6 ceil函数的作用是求不小于给定实数的最小整数。 7 **/ 8 #include 9 #include 10 #include 11 using namespace std;12 const doubl...
分类:其他好文   时间:2014-05-13 22:06:51    阅读次数:253
杭电2005
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int year,month,day; 8 9 char a;10 int days_of_month1[13] = {0,31,29...
分类:其他好文   时间:2014-05-13 22:03:48    阅读次数:375
二分查找
二分查找的一点思考二分查找算法实现#define LOCAL#include#include#includeint const MAX_N=21) { int mid=(ub+lb)/2; if(a[mid]>=k) { ub=m...
分类:其他好文   时间:2014-05-13 21:53:37    阅读次数:328
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!