int const* is a [non-const] pointer to a const int int const* const is a const pointer to a const int For whatever unfortunate accident in history, however, it was found reasonable to also allow the top-level const to be written on the left, i.e., const int and int const are absolutely equivalent.
When modifying a data declaration, the const keyword specifies that the object or variable is not modifiable. The const keyword specifies that a variable's value is constant and tells the compiler to prevent the programmer from modifying it. // constant_values2.cpp // compile with: /c const int ...
حقوق النشر © 2024.CDM كل الحقوق محفوظة.خريطة الموقع