Pointers can be made const. The
compiler will still endeavor to prevent storage allocation and do constant
folding when dealing with const
pointers, but these features
seem less useful in this case. More importantly, the compiler will tell you if
you attempt to change a const pointer, which adds a great deal of
safety.
When using const with pointers,
you have two options: const can be applied to what the pointer is
pointing to, or the const can be applied to the address stored in the
pointer itself. The syntax for these is a little confusing at first but becomes
comfortable with
practice.