c - warning: implicit declaration of function ‘printf’

后端 未结 3 896
走了就别回头了
走了就别回头了 2020-12-29 17:39

I know alot of similar questions were asked before but i couldn\'t find something that would fix this warning i get:

MyIntFunctions.c:19:2: warning: implicit         


        
相关标签:
3条回答
  • 2020-12-29 18:17

    You need to include a declaration of the printf() function.

    #include <stdio.h>
    
    0 讨论(0)
  • 2020-12-29 18:20

    You need to include the appropriate header

    #include <stdio.h>
    

    If you're not sure which header a standard function is defined in, the function's man page will state this.

    0 讨论(0)
  • 2020-12-29 18:26

    the warning or error of kind IMPLICIT DECLARATION is that the compiler is expecting a Function Declaration/Prototype..

    It might either be a header file or your own function Declaration..

    0 讨论(0)
提交回复
热议问题