代码改变世界

C/C++ 指针数组、二维数组

2015-09-09 18:40 by sylar_liang, 405 阅读, 0 推荐, 收藏, 编辑
摘要:一、 二维数组1> 初始化int a[3][3] = { {1,0,0}, {0,1,0}, {0,0,1} }; // 里面的括号是 {} , 而不是()2> 将二维数组当做一维数组处理// void Func(int array[3][10]) 相当于// void Func(int array... 阅读全文

MySQL 基本操作

2015-09-08 18:39 by sylar_liang, 155 阅读, 0 推荐, 收藏, 编辑
摘要:1. show databases; // 显示数据库2. use db_passport; // 使用db_passport数据库3. 创建表create table tb_access( aid int unsigned not null primary key, status tinyint ... 阅读全文

C/C++ 编写一个通用的Makefile 来编译.c .cpp 或混编

2015-09-08 18:03 by sylar_liang, 2154 阅读, 0 推荐, 收藏, 编辑
摘要:1.虽然能编译出程序,但是会提示错误。目前暂未解决make: sinclude: Command not foundmake: *** [test] Error 1272. 后续主要要修改的部分:1>PROGRAM := hello # 设置运行程序名2> SRCDIRS := . # 源程序位于当... 阅读全文

C/C++ 定义接口文件格式

2015-09-08 17:03 by sylar_liang, 600 阅读, 0 推荐, 收藏, 编辑
摘要:#ifndef _XXX_H_#define _XXX_H_#ifdef __cplusplusextern "C" {#endif// Interfacevoid PrintHelloWorld();#ifdef __cplusplus}#endif#endif // _XXX_H_ 阅读全文

string.h c源码实现

2015-09-03 17:00 by sylar_liang, 451 阅读, 0 推荐, 收藏, 编辑
摘要:int isspace( char c ){ char comp[] = { ' ', '\t', '\r', '\n', '\v', '\f' }; const int len = 6; for ( int i=0; i= 'A' && c = s ); return NULL;}// 在字符... 阅读全文

MySql存储过程例子1

2015-09-03 16:58 by sylar_liang, 259 阅读, 0 推荐, 收藏, 编辑
摘要:1. 编写存储过程delimiter //drop procedure if exists p_PreLogin//create procedure p_PreLogin( IN in_username varchar(32), IN in_password varchar(32),... 阅读全文

项目所遇问题

2015-08-30 14:11 by sylar_liang, 182 阅读, 0 推荐, 收藏, 编辑
摘要:问题1: git push时总是提示要输入账户和密码原因: 克隆时使用的是 git clonehttps://github.com/xxx/xxx.git 这种形式。解决: 使用 ssh 方式 而非 https 方式clonegit clone git@github.com:xxx/xxx.git问... 阅读全文

linux下编译C++程序无法链接Mysql的问题

2015-08-15 13:40 by sylar_liang, 497 阅读, 0 推荐, 收藏, 编辑
摘要:1.添加mysql的头文件MYSQLINC = /usr/local/mysql/include或MYSQLINC = /usr/local/mysql2.添加mysql的依赖库#find / -name "libmysqlclient*" // 查找mysql lib的目录MYSQLLIB = -... 阅读全文

linux 同步时间 调试core内核

2015-08-07 18:05 by sylar_liang, 267 阅读, 0 推荐, 收藏, 编辑
摘要:1.同步时间#chkconfig --list | grep ntpntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:offntpdate 0:off 1:off 2:off 3:off 4:off 5:off 6:off#chkconfig nt... 阅读全文

CentOS安装与更新git

2015-07-17 09:45 by sylar_liang, 265 阅读, 0 推荐, 收藏, 编辑
摘要:1.#yum -y install git#git --version此时显示下载的版本是1.7.12.导入证书#rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt3.安装RPMForge源// 打开网址http://pkgs.repoforge.or... 阅读全文
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页