This question already has an answer here:
- C++ Const Usage Explanation 12 answers
What is the difference in fucntion definition between
-
foo(Object &object) const
-
foo(const Object &object)
and
-
foo(const Object &object) const
I know that in first variant object cannot be changed in function. But what about the 2. and 3.? isn`t the 1. and 3. the same? Thank you.
Aucun commentaire:
Enregistrer un commentaire