Click here to Skip to main content
15,917,928 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalintegers Pin
27-Mar-02 7:35
suss27-Mar-02 7:35 
GeneralRe: integers Pin
Jon Sagara27-Mar-02 8:19
Jon Sagara27-Mar-02 8:19 
GeneralRe: integers Pin
Tim Deveaux27-Mar-02 8:24
Tim Deveaux27-Mar-02 8:24 
QuestionPass class member function as paramter? Pin
Todd Smith27-Mar-02 7:22
Todd Smith27-Mar-02 7:22 
AnswerRe: Pass class member function as paramter? Pin
Tim Deveaux27-Mar-02 8:27
Tim Deveaux27-Mar-02 8:27 
GeneralRe: Pass class member function as paramter? Pin
Todd Smith28-Mar-02 8:02
Todd Smith28-Mar-02 8:02 
AnswerRe: Pass class member function as paramter? Pin
soptest27-Mar-02 8:51
soptest27-Mar-02 8:51 
AnswerRe: Pass class member function as paramter? Pin
Jim Crafton27-Mar-02 10:50
Jim Crafton27-Mar-02 10:50 
Well if you can keep the same parameters for the function then this might work

template <typename T>
class FunctionPointer {

typedef void (T::*FuncPtr)(int);

FunctionPointer( T* src, FuncPtr func ):m_source( src ), m_func(func) {};

void doit( int x ) {
(m_source->*m_func)(x)
}
FuncPtr m_func;
T* m_source;
};

template <typename T>
void foo(FunctionPointer<T> fp )
{
int x = 0;
for (int i=0; i<10; i++) {
fp.doit(x);
}
}


MyClass::blah()
{
foo( FunctionPointer<MyClass>(this, DoSomething) );
}

would this work ?
GeneralHistory list in browser window Pin
Aaron Schaefer27-Mar-02 6:24
Aaron Schaefer27-Mar-02 6:24 
Generalsending keystrokes to window Pin
vins27-Mar-02 5:14
vins27-Mar-02 5:14 
GeneralRe: sending keystrokes to window Pin
Tim Deveaux27-Mar-02 6:12
Tim Deveaux27-Mar-02 6:12 
GeneralRe: sending keystrokes to window Pin
vins27-Mar-02 6:22
vins27-Mar-02 6:22 
GeneralRe: sending keystrokes to window Pin
Tim Deveaux27-Mar-02 7:41
Tim Deveaux27-Mar-02 7:41 
GeneralRe: sending keystrokes to window Pin
vins27-Mar-02 8:16
vins27-Mar-02 8:16 
QuestionHow do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 5:03
Tommy Svensson27-Mar-02 5:03 
AnswerRe: How do I determine what functions a dll are exporting? Pin
Chris Losinger27-Mar-02 5:27
professionalChris Losinger27-Mar-02 5:27 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 6:08
Tommy Svensson27-Mar-02 6:08 
AnswerRe: How do I determine what functions a dll are exporting? Pin
Paul M Watt27-Mar-02 5:48
mentorPaul M Watt27-Mar-02 5:48 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 6:16
Tommy Svensson27-Mar-02 6:16 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 6:36
Tommy Svensson27-Mar-02 6:36 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Paul M Watt27-Mar-02 9:03
mentorPaul M Watt27-Mar-02 9:03 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson1-Apr-02 21:49
Tommy Svensson1-Apr-02 21:49 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tomasz Sowinski27-Mar-02 10:24
Tomasz Sowinski27-Mar-02 10:24 
AnswerRe: How do I determine what functions a dll are exporting? Pin
JT Anderson27-Mar-02 6:04
JT Anderson27-Mar-02 6:04 
AnswerRe: How do I determine what functions a dll are exporting? Pin
sanjay mishra2-Apr-02 0:35
sanjay mishra2-Apr-02 0:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.