cse-icons 0 Report post Posted January 25, 2005 hi everyone,here is an exercise for u... I found it quite interesting... hope u like it too....The question is :How do you call a function, given its name as a string? Try it out and post the solution/example.... or post ur approach to the sol...a hint: the solution is not very difficult...I will post the solution next week....cya, keep trying... All the best. Cheers. Share this post Link to post Share on other sites
LuciferStar 0 Report post Posted January 25, 2005 hi everyone, here is an exercise for u... I found it quite interesting... hope u like it too.... The question is : How do you call a function, given its name as a string? Try it out and post the solution/example.... or post ur approach to the sol... a hint: the solution is not very difficult... I will post the solution next week.... cya, keep trying... All the best. Cheers. 43146[/snapback] You may try something like function pointer.I have an article about this: http://forums.xisto.com/topic/833-how-to-make-9-8-7-6-24/ modify it to fit your use. Share this post Link to post Share on other sites
yomi 0 Report post Posted January 26, 2005 Oh, I have interest in this question.Xisto-file-no-833.html is somewhat too simple and means nothing.Vxworks do this way very well, but I still don't know how it works.Waiting for your solution. Share this post Link to post Share on other sites
s243a 0 Report post Posted January 26, 2005 I know with dynamically linked libraries you can get a function reference by passing a string that contains the function name. So you just compile the functions as a DLL it will work. Share this post Link to post Share on other sites
yomi 0 Report post Posted January 26, 2005 but params, how to give the correct params? like: func("asdf",1) I know with dynamically linked libraries you can get a function reference by passing a string that contains the function name. So you just compile the functions as a DLL it will work. 43426[/snapback] Share this post Link to post Share on other sites