Title: C++ Return by Reference | C++ Tutorials | CodeMistic
Description: A C++ function can return a reference in a similar way as it returns a pointer. When returning a reference, be careful that the object being referred to does not go out of scope. So it is not legal to return a reference to local var. But you can always return a reference on a static variable.
Keywords:
Domain: codemistic.github.io
Links:
Viewport: width=device-width, initial-scale=1.0