Initialize Static Array of Structs in C

后端 未结 3 1610
暗喜
暗喜 2021-02-03 20:34

I\'m implementing a card game in C. There are lots of types of cards and each has a bunch of information, including some actions that will need to be individually scripted assoc

3条回答
  •  悲&欢浪女
    2021-02-03 20:47

    Your approach is right and will work. Your function pointer syntax is right, except that you don't use parameter names - just types:

    int (*do_actions)(struct GAME_STATE *, int, int);
    

提交回复
热议问题