Q:

Why does read define its Sales_data parameter as a plain reference and print define its parameter as a reference to const

0

Why does read define its Sales_data parameter as a plain reference and print define its parameter as a reference to const?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

The `read` function will change its `Sales_data` parameter and pass the information back via plain reference.

The `print` function won't change its `Sales_data` parameter, and by using a reference to `const`, we can print `const Sales_data` object as well.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now