Skip to content

函数指针的参数不都是为空的情况,要如何处理 #1

Description

@zhaozhengcoder

请问:

在代码里面
void GetUp();
void Go2School();
这些触发事件都是没有参数的,假如它们都有参数,而且每个的参数不同。

那么,下面这个数据结构里面的函数指针就都不相同了
typedef struct FsmTable_s
{
int event; //事件
int CurState; //当前状态
void (*eventActFun)(); //函数指针
int NextState; //下一个状态
}FsmTable_t;

请问,如果是这种情况,要如何处理?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions