Skip to main content
GameDev.net gamedev.net
🔒 Locked

function pointer argument

Started by sprinter_trueno Jan 9, 2003 at 1:58 AM 1 replies 150+ views
Original Post
sprinter_trueno
sprinter_trueno
Hi there, I have a question regarding function pointer n classes. I want to define a member function in a class which has a function pointer in it''s argument list for a function of the same class. Example: class Sample { // The function which gets function addresses void Work(???); // The kind of function i want to pass int Func(DWORD x); } How has Work''s argument list to be done ? Thanks alot for any comment Lorenz
DerekSaw
DerekSaw
class Sample
{
void Work( int (Sample::*method)(DWORD) )
{
(this->*method)(somenumber_);
}
};

"after many years of singularity, i'm still searching n the event horizon" o

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.