Using “const” reference arguments in a function is beneficial in several ways:
“const” protects from programming errors that could alter data.
As a result of using “const”, the function is able to process both const and non-const actual arguments, which is not possible when “const” is not used.
Using a const reference will allow the function to generate and use a temporary variable in an appropriate manner.
Structure & User-Defined Data Types