I get this error:
Multiple markers at this line
- ‘test2’ was not declared in this scope
- expected primary-expression before ‘&’
'test2' was not declared in the scope. The error message is not ambiguous. You can not just take the address of an undeclared variable like that.
What you want to do is pass the function itself, not call the function.