随笔分类 -  C语言

什么时候该用assert
摘要:—————————————————-Michael to pongba有下面2种方法:方法一:Section *pImageSection = new Section(pImage);assert(pImageSection);方法二:略ps:现在项目组代码用第一方法,并且也不写日志,每一次客户端d... 阅读全文

posted @ 2015-06-15 15:05 xuelei56 阅读(263) 评论(0) 推荐(0)

C语言读写文件
摘要:FOPEN(3) Linux Programmer’s Manual FOPEN(3)NAME fopen, fdopen, freopen - stream open functionsSYNOPSIS #include FILE *fopen(const c... 阅读全文

posted @ 2015-06-11 18:45 xuelei56 阅读(129) 评论(0) 推荐(0)

C语言字符数组的定义与初始化
摘要:C语言字符数组的定义与初始化1、字符数组的定义与初始化字符数组的初始化,最容易理解的方式就是逐个字符赋给数组中各元素。char str[10]={ 'I',' ','a','m',' ',‘h’,'a','p','p','y'};即把10个字符分别赋给str[0]到str[9]10个元素如果花括号中... 阅读全文

posted @ 2015-06-09 14:21 xuelei56 阅读(4500) 评论(0) 推荐(0)

char与unsigned char本质区别
摘要:char 与 unsigned char的本质区别 在C中,默认的基础数据类型均为signed,现在我们以char为例,说明(signed) char与unsigned char之间的区别。 首先在内存中,char与unsigned char没有什么不同,都是一个字节,唯一的区别是,char... 阅读全文

posted @ 2015-05-28 11:43 xuelei56 阅读(485) 评论(0) 推荐(0)

导航