Hi!
This is just an example code:
#include<iostream>
using namespace std;
int& example()
{
int a=5;
return &a;
}
int main()
{
cout << example();
}
But I'm getting this error:
Error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int*'