Using const in member functions C++
Reading a C++ book, I found this little code: Std::string getName() const {} The books says that the declaration of the member function as constant it's because in the process of returning the name the function does no, and should not modify the object in which it's called. So... Each object shouldn't be modify? When do I need to use const? Also, I have been using this, putting the const inside the parameter Void someFunction (const string & A) But now, I'm not sure which one I should use: Void someFunction (const string & A) const Void someFunction (const string &A) Void someFunction (string&A) const Which one should I use? I'm so confused, which one is the correct? What are the differences between put const inside the parameter, put const outside or put both, inside parameter and outside?