I have a few questions about const function paramaters ie.
Is there any benefit to using them, either than maybe keeping things well formed and informative? Is the code that's generated for the function any different than not using const parameters, or is this just a compile time check?Code:void constfunc(const int *i) {} //as opposed to void func(int *i) {}
I just have doubts about them seeing as all one has to do to modify the variable is declare another pointer, copy over the address of the const, and then use the new pointer to modify the data (not that I'd ever do such a thing ).
Actually, is there much point to using const at all, either than having some useful compiler warnings when you try to do something you shouldn't?