Chinaunix首页 | 论坛 | 博客
  • 博客访问: 386993
  • 博文数量: 61
  • 博客积分: 1546
  • 博客等级: 中尉
  • 技术积分: 708
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-22 20:07
文章分类

全部博文(61)

文章存档

2011年(61)

分类: C/C++

2011-06-07 22:44:51

C++ has two type of constants: literal and symbolic.

literal constants example:
int myAge = 26; //26 is a literal constant, you can't assign a value to 26 and it's value can't be changed.

symbolic constants example:
const int birthYear = 1986;// birthYear is a symbolic constants. it must assign value when defint and can't change it's value later.
阅读(1233) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~