Why does an empty declaration work for definitions with int arguments but not for float arguments?

前端 未结 3 1369
星月不相逢
星月不相逢 2020-12-02 21:29

I thought the difference is that declaration doesn\'t have parameter types...

Why does this work:

int fuc();

int fuc(int i) {
  printf(         


        
3条回答
  •  [愿得一人]
    2020-12-02 22:26

    prototype = forward declaration, so you can use it before you tell the compiler what it does. It still has parameters, however.

    Useful in a lot of respects!

提交回复
热议问题