I tried following code :
#include #include using namespace std; string f1(string s) { return s=\"f1 called\"; } void f2(s
Your program doesn't compile because f1 has a parameter and you're not passing any.
f1
Additionally, the value returned from a function is an rvalue, you can't take its address.