摘要: C语言中const的用法 const:在定义变量时,如果使用关键字const,那就表示限制这个变量值不允许被改变。 (1) 修饰变量 const离谁越近,谁的值就不能改变. int const a=0 声明一个变量a,把0赋值给a,用const修饰之后,a再也不能被赋其他值。此时int const 阅读全文
posted @ 2016-05-30 17:15 beautiful_lady 阅读(10206) 评论(0) 推荐(0) 编辑