摘要: 原创笔记,转载请注明出处! 点击【关注】,关注也是一种美德~ 第一,const与#define的相同点 C++中的const常量类似于宏定义 const int c = 5 ≈ #define c 5 const是用来替换#define的一个手段。 程序一: int main() { const i 阅读全文
posted @ 2018-05-07 23:34 tyyhmtyyhm 阅读(166) 评论(0) 推荐(0) 编辑
摘要: C++中的const修饰的是一个真正的常量 阅读全文
posted @ 2018-05-07 23:16 tyyhmtyyhm 阅读(208) 评论(0) 推荐(0) 编辑