You're missing the parenthesis after foo.
cout << foo() << "\n"; // add () after you call functions
Last edited on
You are not missing anything, it is your compiler that is the "problem."
I tried your code in Visual Studio 2015 (Community) and in TDM-GCC 4.9.2 (Orwell's Dev-C++).
VS prints out the function's address, as the tutorial expects.
TDM-GCC prints out the same as you receive, with the same warning.
I had a feeling that might be the reason. The author is using VS.
I am also using GCC from MinGW
Thanks for the quick reply.
Last edited on