摘要: C++ const (一) 2.1 基础 使用关键字const可以对变量的类型加以限定,将其定义为一个常量 const int buf_size = 512; 任何试图为buf_size赋值的行为都会引发错误 const对象必须初始化 限制: 只能在const类型的对象上执行不改变其内容的操作,例如 阅读全文
posted @ 2021-09-26 16:41 ziggystardust 阅读(55) 评论(0) 推荐(0)