473,385 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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:\home\Krychu\projects\GameName\Input\CExample.cp p(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
Jul 19 '05 #1
3 1339
try with
void SetEventDispatch( void (* EventDispatch::func)(const in_event_t *) );

Jul 19 '05 #2


Kevin Joplin wrote:

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
regards
Kevin


--
Karl Heinz Buchegger
kb******@gascad.at
Jul 19 '05 #3
Hi,
thanks for all your help!
Kevin
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: haref | last post by:
hi ng, what can i do in the following mail function, which hast 400 subscribers who are read from a database and to which the mails are send in a loop, when there are some adresses who are not...
1
by: haref | last post by:
hi ng, what can i do in the following mail function, which hast 400 subscribers who are read from a database and to which the mails are send in a loop, when there are some adresses who are not...
2
by: Wenjie | last post by:
Hello, I read someone posted assertions that even the (public) member function is not static, there are probably only one copy of the code in the executable. Then except the...
2
by: joe | last post by:
hi, after reading some articles and faq, i want to clarify myself what's correct(conform to standard) and what's not? or what should be correct but it isn't simply because compilers don't...
6
by: Bernhard | last post by:
Hello, I would like to build a small interpreter (in an c-program), which calls functions with user-defined arguments. To do this, I have a list of functions names (in an array), with the...
3
by: Leszek Gruszka | last post by:
How to get static IP adresses from DHCP?
1
by: Dirk Goossens | last post by:
Hi everybody I have a table containing a list of E-mail adresses. Is it possible to send an E-mail (one by one) to all the adresses? Is it also possible to add an attachment? Thanks for the...
13
by: JohnQ | last post by:
The implementation of classes with virtual functions is conceptually easy to understand: they use vtables. Which begs the question about POD structs: how are they associated with their member...
0
by: SentinalBlade | last post by:
I have an executable that is disassembeled into ASM, but cannot edit it directly very easily, and if i set soemthing to NOP through my debugger, it adds more line adresses that screws up the whole...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.