1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Variable arguments to lookup table function pointers

Discussion in 'C++' started by ftl25, Aug 28, 2010.

  1. ftl25

    ftl25 New Member

    Aug 28, 2010
    Likes Received:
    Trophy Points:

    Is is possible to create a lookup table of function pointers to functions with variable numbers/types of arguments?

    If not, can anyone recommend a solution for my problem? I have a list of commands corresponding to functions with variable types/numbers of arguments. Some don't take any arguments. I was planning to use a LUT of function pointers; is there any alternative apart from a long list of if/else statements?
    Please note I am restricted to using ansi C library functions (embedded project).
    Any help greatly appreciated.

Share This Page