Is this the correct way to set a contact processed callback, or is there a proper function to set it?
extern ContactProcessedCallback gContactProcessedCallback;
gContactProcessedCallback = MyContactProcessedCallback;
Correct way to set a ContactProcessed callback?
-
- Posts: 71
- Joined: Thu May 22, 2008 8:03 pm
Re: Correct way to set a ContactProcessed callback?
that will work but the more correct way of doing it is:
gContactProcessedCallback = &MyContactProcessedCallback;
Notice the address operator there to explicitly specify that you are assigning the address to a pointer.
gContactProcessedCallback = &MyContactProcessedCallback;
Notice the address operator there to explicitly specify that you are assigning the address to a pointer.
-
- Posts: 16
- Joined: Wed Apr 23, 2008 9:57 am
Re: Correct way to set a ContactProcessed callback?
Aside from the debatable semantics of passing a pointer to a function, that is the correct way?
-
- Posts: 71
- Joined: Thu May 22, 2008 8:03 pm