I am having trouble understanding why there are some options in c++ in order to avoid changes in variables value if an exception is always thrown which alerts the user that you are redefining a variable. I am referring for instance, to defining a variables as:
const int x=55
;
In my short experience with C++, I can't tell why writing const is useful at all. Also related to this, I am guessing that when you work with public clases for instance, redefining a variable would get the same alert by C++. Why are then useful private clases if data members cannot be changed?
Do these unexpected changes in values of variables occur under some special conditions which are much less common?