is const (c++) optional?
- by Dr Deo
according to some tutorials i read a while back, the "const" declaration makes a variable "constant" ie it cannot change later.
But i find this const declaration abit inconveniencing since the compiler sometimes gives errors like
"cannot convert const int to int"
or something like that.
and i find myself cheating by removing it anyway.
question:
assuming that i am careful about not changing a variable in my source code, can i happily forget about this const stuff?
Thanks in advance