Question: 2. What is wrong when we return a local (automatic) object from a function that expects a reference as return type? For example, have a
2. What is wrong when we return a local (automatic) object from a function that expects a reference as return type? For example, have a look at the following code: // Incorrect example int& FlunkyFunc ) int result = 1; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
