码迷,mamicode.com
首页 >  
搜索关键字:char    ( 35907个结果
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
杭电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
strcat strcpy strlen
1 char * strcat(char * dest, const char * src) { 2 assert(dest != NULL && src != NULL); 3 char * p = dest; 4 while (*p) 5 p++; 6 ...
分类:其他好文   时间:2014-05-13 20:30:10    阅读次数:272
unix环境编程 目录操作
1、目录操作有 mkdir(constchar *pathname,mode_t mode) 创建目录,成功则返回0,若出错则返回-1 int rmdir(const char *pathname) rmdir可以删除一个空目录,成功则返回0,若出错返回-1 DIR *opendir(const *pathname) 成功则返回指针,若出错则返回NULL...
分类:其他好文   时间:2014-05-13 08:06:02    阅读次数:298
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!