Function pointer without arguments types?

后端 未结 3 1041
鱼传尺愫
鱼传尺愫 2020-12-17 03:06

I was trying to declare a function pointer that points to any function that returns the same type. I omitted the arguments types in the pointer declaration to see what error

3条回答
  •  一生所求
    2020-12-17 03:52

    void (*pointer)() explains function pointed have unspecified number of argument. It is not similar to void (*pointer)(void). So later when you used two arguments that fits successfully according to definition.

提交回复
热议问题