C function syntax, parameter types declared after parameter list

前端 未结 7 803
一个人的身影
一个人的身影 2020-11-22 12:34

I\'m relatively new to C. I\'ve come across a form of function syntax I\'ve never seen before, where the parameter types are defined after that parameter list. Can someone e

7条回答
  •  不知归路
    2020-11-22 12:45

    There is no difference, it is just that that is the old syntax for function declarations in C -- it was used pre ANSI. Never write such code unless you plan to give it to your friends from the 80's. Also, never depend upon implicit type assumptions (as another answer seems to suggest)

提交回复
热议问题