const keyword in functions
Posted on 2006-11-18
when functions are declared with const parameters, I think I read it means it will not be changed within that function.
functionOne( const string& a);
functionTwo( const Test& t);
funcionThree(const bool c);
Are these always good idea when I am not going to change that parameter inside the function?
Also, functionOne(const string a) is it going to be the same as functionOne(const string& a)
Other than that I am passing reference rather than value.