Right, it is void (__cdecl *)(void), but there should be no need to release the pointer or anything like that. Just trunst yourself, you'll be fine.
I would suggest that that you look into the C++ construct called functors, or function objects. They allow you to manage function pointers in a...
EF,
No, there is no problem about having multiple references to aglobal function. Your changes to the code do not make much sense, unless you also changed to copy constructor to the following
fpReqSer = rhs.fpReqSer;
which is what I asked you to do in the first place.
I posted an answer to your other thread.
The idea is that function pointers are the same as any other pointer. Please look at the following example.
int a;
int *a_ptr;
int b;
int *b_ptr;
a = 100;
a_ptr = &a; // now a = 100 and *a_ptr = 100
b = 200;
b_ptr = &b; // now b = 200 and *b_ptr = 200...
EF,
a::a(const a &rhs)
{
//*fpReqSer = *rhs.fpReqSer; //something not right??? yes
// try this
fpReqSer = rhs.fpReqSer;
}
I had this wonderful huge explanation written out, but I lost it when I clicked on preview. If you want to know why, just post again...
-adeh
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.