阅读背景:

在struct对象中存储指向具有可变数量参数的函数的指针

来源:互联网 

I'm trying to store a list of user commands in a struct. The struct consists of a command (char array) and a pointer to a static member function which may have any number of arguments. I would like to be able to instantiate the struct, and store them in a vector, and then when accessing one, to call the function pointer it stores, passing in the necessary arguments.I'm trying to store a list of user commands in




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: