- 5
- 0
- 约5.58千字
- 约 6页
- 2017-08-17 发布于河南
- 举报
c中const用法总结(Summaryofconstusageinc)
c++中const用法总结(Summary of const usage in c++)
Summary of const usage in C++
1. const constants, such as const, int, max = 100;
Advantages: const constants have data types, and macro constants have no data type. The compiler can perform a type security check on the former, while the latter only performs character substitution, there is no type of security check, and unexpected errors may occur when the characters are replaced.
2. const modified class data members. Const data members are constants only in the lifetime of an object, and are mutable for the entire class. Because classes can create
您可能关注的文档
- 2014计算机应用基础_在线作业_b(2014 basic computer application _ online homework _b).doc
- 23《称象》教学设计之四(23 as teaching design four).doc
- 28_小伙伴的教学反思3(Reflections on the teaching of 28_ buddy 3).doc
- 24《东方之珠》(24 the Oriental Pearl ).doc
- 23《美丽的小兴安岭》教学设计之九(23 beautiful little Xingan Ling teaching design nine).doc
- 2d游戏设计浅谈(Discussion on game design 2D).doc
- 2到3岁宝宝语言学习游戏(2 to 3 years old baby language learning games).doc
- 2d网络游戏排行榜排行(2D online game Ranking Ranking).doc
- 2春雨的色彩教学反思(Reflection on the 2 spring color teaching).doc
- 2b论文(2B paper).doc
原创力文档

文档评论(0)