E2364 Attempting to return a reference to a local object (C++)

From Appmethod Topics
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

You attempted to return a reference to a temporary object in a function that returns a reference type. This may be the result of a constructor or a function call.

This object will disappear when the function returns, making the reference illegal.