Exercise: Use const
¶
Description¶
class User
has several shortcomings:
Constructor parameters are passed by copy
Access methods are returned by copy
Modify those to use const
references!
const
¶class User
has several shortcomings:
Constructor parameters are passed by copy
Access methods are returned by copy
Modify those to use const
references!