摘要: const的用法: 在C语言中,const修饰的是只读变量,并不是一个常量,本质还是一个变量。const修饰的变量会占用内存空间,本质上const只对编译器有用,它告诉编译器,这个变量是只读的,不能对其进行左值操作,运行时没用。const含义是“请做为常量使用”,而并非“放心吧,那肯定是个常量”。 阅读全文
posted @ 2018-03-31 10:03 Jonathan.jack.lei 阅读(204) 评论(0) 推荐(0) 编辑
摘要: I think that, from a biological standpoint, human life almost reads like a poem. It has its own rhythm and beat, its internal cycles of growth and dec 阅读全文
posted @ 2018-04-23 11:58 Jonathan.jack.lei 阅读(296) 评论(0) 推荐(0) 编辑
摘要: assert是常用于程序调试的一个宏函数,在程序运行时,计算assert()括号里面的表达式,如果为false则报错,并且终止程序的运行,相反继续运行。 简而言之:assert()函数的功能是终止程序以免导致更加严重的错误,同时也用于查找错误。 使用assert()函数的情况: 1.在函数开始时检验 阅读全文
posted @ 2018-04-16 21:49 Jonathan.jack.lei 阅读(1922) 评论(0) 推荐(0) 编辑