A constant is a variable that has a value that cannot be changed once the constant has been assigned. This allows the compiler to enforce that the variable’s value is not changed anywhere in the code by mistake.
23. Constants
Get C++20 Quick Syntax Reference: A Pocket Guide to the Language, APIs, and Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.