c++ - How to create a lookup table -
basically i've realised way i've coded project need implement form of lookup table, have never done before , therefore don't know how , googling doesn't give clear set of instructions
i need lookup table user can input function command line , pass in parameters function, no idea start
i don't know requirements, imagine sth this:
you might want have c++ function pointers. make own struct holds:
- name of function
- pointer function
- vector of variants (for example boost or write yourown) hold arguments
- validate function see if arguments , function pointer fit
create each function user can call instance of struct. display user , let him choose. in second step, let him enter values arguments.
Comments
Post a Comment