 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Kevin Joplin Guest
|
Posted: Mon Oct 27, 2003 12:41 pm Post subject: member function adresses |
|
|
Hi,
i have the following problem with getting member function adress:
class CExmaple {
public:
CExample();
~CExample();
void SetEventDispatch( void (* func)(const in_event_t *) );
void EventDispatch( const in_event_t *event );
};
CExample::CExample()
{
SetEventDispatch( EventDispatch );
}
//here goes implementation of other CExample member functions, i wont
//place them here for clarity.
i get error here... beceuse of pointers:
c:homeKrychuprojectsGameNameInputCExample.cpp(30): error C2664:
'CExample::SetEventDispatch' : cannot convert parameter 1 from 'void
(const in_event_t *)' to 'void (__cdecl *)(const in_event_t *)'
(i'm using vc++ .net 2003)
could someone give me a hint how to solve this problem ?
regards
Kevin
|
|
| Back to top |
|
 |
Antonio Guest
|
Posted: Mon Oct 27, 2003 12:56 pm Post subject: Re: member function adresses |
|
|
try with
void SetEventDispatch( void (* EventDispatch::func)(const in_event_t *) );
|
|
| Back to top |
|
 |
Karl Heinz Buchegger Guest
|
Posted: Mon Oct 27, 2003 1:09 pm Post subject: Re: member function adresses |
|
|
Kevin Joplin wrote:
| Quote: |
could someone give me a hint how to solve this problem ?
|
This is in the FAQ
http://www.parashift.com/c++-faq-lite/
see section 33
--
Karl Heinz Buchegger
[email]kbuchegg (AT) gascad (DOT) at[/email]
|
|
| Back to top |
|
 |
Kevin Joplin Guest
|
Posted: Mon Oct 27, 2003 1:47 pm Post subject: Re: member function adresses |
|
|
Hi,
thanks for all your help!
Kevin
|
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|