What is the default value of a function pointer in C++? (Apparently it can\'t be NULL, so what is it?)
NULL
How is this program supposed to behave and why?>
A function pointer can be NULL and you may assign NULL to it. Have a look here for instance:
#include using namespace std; struct S { void (*f)(); }; int main() { S s = S(); s.f = NULL; return 0; }
I believe the way you call the constructor of the structure(with ()), f will be NULL.
()