I have read about use cases of const and I feel like I have a good understanding of const for the most part. However, I can't seem to figure out why I don't see this more often:
void someFunction(const string& A) const
Where you have a const parameter in a const member function. For some reason, whenever I look up examples and the function is const, the const seems to be stripped off the parameters like this:
void someFunction(string& A) const
However that doesn't seem to stop me from modifying A. Is it considered bad form to have const parameters in a const member function?
What is the reasoning for not keeping the const in the parameters as well if A would not be modified?
EDIT: This is my fault for not clarifying but I understood the difference between adding it before the parameter and adding it after the function. A lot of code I looked at just never combined the two and I was just trying to figure out if there was a reason for that.