错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Const Qualifier

  • Slobodan Dmitrović

摘要

To make the object a read-only object, we apply the const qualifier to its declaration. Once initialized, these objects become read-only, and we call them constants. Attempting to change their values results in a compile-time error. Let us write an example that defines a few simple constants: