By chance, I found this code to compile on VS2012.
typedef void (*func)();
func f = func(12);
finitialized with the integer 12 as its address. as far as I know, an action with an integer on a function pointer really does look like this:
func f = (func)12;
while the statement is func(12)more like a constructor, so I tried this:
func f(12);
and failed to compile.
func f = (func)12
func f = func(12);
func f(12);
func f = 12;
so my question is:
- What is the real basic syntax
func(12), is listing or initialization? - How to initialize a pointer to a function with an integer?
- Should compilation of the 4th expression? What about the third?
Frahm