长风破浪会有时,直挂云帆济沧海

Dream Word

博客园 首页 新随笔 联系 订阅 管理
  148 随笔 :: 0 文章 :: 2 评论 :: 90304 阅读

03 2017 档案

摘要:copy from:http://www.cppblog.com/cxiaojia/archive/2012/07/31/185760.html 基本数据结构:链表(list) 谈到链表之前,先说一下线性表。线性表是最基本、最简单、也是最常用的一种数据结构。线性表中数据元素之间的关系是一对一的关系, 阅读全文
posted @ 2017-03-16 23:11 长风II 阅读(389) 评论(0) 推荐(0) 编辑

摘要://比较字符串s1和s2的前n个字节是否相等 int bcmp(const void* s1,const void*s2,int n); //将字符串src的前n个字节复制到dest中 void bcopy(const void *src,void *dest,int n); //设置字节字符串s的 阅读全文
posted @ 2017-03-13 22:23 长风II 阅读(137) 评论(0) 推荐(0) 编辑

摘要:因为C++支持两种字符串,即常规的ANSI编码(使用“”包裹)和Unicode编码(使用L“”包裹) 字符串处理函数,比如strlen和wcslen #ifdefine _UNICODE #define TCHAR wchar_t #endif -tcslen = strlen #ifndefine 阅读全文
posted @ 2017-03-13 21:56 长风II 阅读(163) 评论(0) 推荐(0) 编辑

摘要:/****/ //求两个int值得最大值 inline int const& max(int const& a,int const& b) { return a<b?b:a; } //求两个任意类型值中的最大值 template <typename T> inline T const& max(T 阅读全文
posted @ 2017-03-04 18:33 长风II 阅读(373) 评论(0) 推荐(0) 编辑

摘要://file max.hpp template <typename T> //template<class T> inline T const& max (T const& a,T const& b) { return a<b?b:a; } //file max.cpp #include <iost 阅读全文
posted @ 2017-03-04 18:08 长风II 阅读(241) 评论(0) 推荐(0) 编辑

摘要:1:check version gcc -v / g++ -v 2:compile gcc *.c / g++ *.cpp outfile: a.out 3:excute ./a.out 4:show excute time time ./a.out 5:change the after compi 阅读全文
posted @ 2017-03-04 17:40 长风II 阅读(170) 评论(0) 推荐(0) 编辑

摘要:int p; int *p; int p[3]; int *p[3];分析方式:首先从P开始分析,先与[]结合因为其优先级比*高,所以p是一个数组,然后再与*结合,说明数组里的元素是指针类型,然后再与int结合,说明指针所指向的内容的类型是整形的,所以P是一个由返回整形数据的指针所组成的数组。 in 阅读全文
posted @ 2017-03-04 16:45 长风II 阅读(137) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示