In C++ what is the difference between return by value and return by reference in the function?

abc abc 351 Reputation points
2022-05-08T13:08:17.777+00:00

Hi,

In C++ what is the difference between return by value and return by reference in the function?

When we need to use return by value and return by reference in the function?

Thanks.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,537 questions
{count} votes