Click here to Skip to main content
15,894,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Function Pointer? Pin
Chris Richardson6-Jan-03 11:38
Chris Richardson6-Jan-03 11:38 
GeneralAdvanced Function Pointer? Pin
Aidman6-Jan-03 13:02
Aidman6-Jan-03 13:02 
GeneralRe: Advanced Function Pointer? Pin
valikac6-Jan-03 14:13
valikac6-Jan-03 14:13 
GeneralRe: Advanced Function Pointer? Pin
Aidman6-Jan-03 21:37
Aidman6-Jan-03 21:37 
GeneralRe: Advanced Function Pointer? Pin
Stefan Pedersen7-Jan-03 1:55
Stefan Pedersen7-Jan-03 1:55 
GeneralRe: Advanced Function Pointer? Pin
Aidman7-Jan-03 3:28
Aidman7-Jan-03 3:28 
GeneralRe: Advanced Function Pointer? Pin
Stefan Pedersen7-Jan-03 3:34
Stefan Pedersen7-Jan-03 3:34 
GeneralRe: Advanced Function Pointer? Pin
Todd Smith7-Jan-03 5:46
Todd Smith7-Jan-03 5:46 
It looks you're trying to create a scripting engine. If that's the case then most scripting engines accept arguments as strings and then convert those arguments into the proper types.

int TheRealFunc(const char* argument)
{
    // agument is an integer so lets convert
    int i = atoi(argument);

    // blah blah blah
}


Or, for each "real" function there's a wrapper function for your scripting engine that parses the parameters and then does the real call

int TheRealFunc(int a1, int a2, float a3)
{
    // blah blah blah
}

int TheRealFuncWrapper(const char* argument1, const char* argument2, const char* argument3)
{
    // convert the parameters
    int a1 = atoi(argument1);
    int a2 = atoi(argument2);
    float a3 = atof(argument3);

    return TheRealFunc(a1, a2, a3);
}


Todd Smith
GeneralRe: Advanced Function Pointer? Pin
Aidman7-Jan-03 6:37
Aidman7-Jan-03 6:37 
GeneralRe: Advanced Function Pointer? Pin
Chris Richardson7-Jan-03 7:38
Chris Richardson7-Jan-03 7:38 
GeneralRe: Advanced Function Pointer? Pin
Aidman7-Jan-03 10:50
Aidman7-Jan-03 10:50 
GeneralFunction Pointers in OOP Pin
tilli again6-Jan-03 11:11
susstilli again6-Jan-03 11:11 
GeneralRe: Function Pointers in OOP Pin
Alvaro Mendez6-Jan-03 11:38
Alvaro Mendez6-Jan-03 11:38 
GeneralRe: Function Pointers in OOP Pin
William E. Kempf6-Jan-03 12:03
William E. Kempf6-Jan-03 12:03 
GeneralRe: Function Pointers in OOP Pin
valikac6-Jan-03 16:07
valikac6-Jan-03 16:07 
GeneralRe: Function Pointers in OOP Pin
tilli again7-Jan-03 8:43
susstilli again7-Jan-03 8:43 
GeneralRe: Function Pointers in OOP Pin
tilli again8-Jan-03 8:18
susstilli again8-Jan-03 8:18 
QuestionTree Control Check Boxes... ??? Pin
work_to_live6-Jan-03 9:31
work_to_live6-Jan-03 9:31 
AnswerRe: Tree Control Check Boxes... ??? Pin
work_to_live6-Jan-03 9:51
work_to_live6-Jan-03 9:51 
QuestionSynchronization.. do I need? Pin
Subrahmanyam6-Jan-03 9:15
Subrahmanyam6-Jan-03 9:15 
AnswerRe: Synchronization.. do I need? Pin
Tim Smith6-Jan-03 10:17
Tim Smith6-Jan-03 10:17 
AnswerRe: Synchronization.. do I need? Pin
Chris Losinger6-Jan-03 10:59
professionalChris Losinger6-Jan-03 10:59 
QuestionDebugging Mutexes? Pin
clintsinger6-Jan-03 8:09
clintsinger6-Jan-03 8:09 
AnswerRe: Debugging Mutexes? Pin
Tim Smith6-Jan-03 8:39
Tim Smith6-Jan-03 8:39 
GeneralRe: Debugging Mutexes? Pin
clintsinger6-Jan-03 8:47
clintsinger6-Jan-03 8:47 

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.