mercredi 3 août 2016

Differencies using const [duplicate]

This question already has an answer here:

What is the difference in fucntion definition between

    1. foo(Object &object) const
    1. foo(const Object &object)

and

    1. 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