How to resolve “conflicting types error” in C?

后端 未结 7 606
情话喂你
情话喂你 2021-01-27 16:33

For the following C code (for swapping two numbers) I am getting the \"conflicting types\" error for swap function:

#include 
#includ         


        
7条回答
  •  醉梦人生
    2021-01-27 17:09

    With GCC, this is a warning,
    when you dont declare a function before using it, the compiler tries to guess the declaration using the type of call made to that function.Hence the behavior.

提交回复
热议问题