Today I have learned that function pointers and data pointers are not the same and are therefore not compatible with each other (Why are function pointers and data pointers incompatible in C/C++?). My question however is, are different function (non member) pointers compatible with each other (are implemented the same way).
In code:
typedef void(*FuncPtr0)();
typedef void(*FuncPtr1)(int);
FuncPtr0 p0;
FuncPtr1 p1;
p0 = reinterpret_cast<FuncPtr0>(p1); // will this always work, if p1 really
p0(); // points to a function of type FuncPtr0
Thanks for your help!