Understanding const pointers and variables in C++
In modern C++, we are used to see const pointers. They are a useful way to avoid changes in memory passed to a function. As such, they are very common in function declarations. The const word, however, has other uses. It turns out that when the const keyword is applied to the pointer itself (instead…