warning: implicit declaration of function

前端 未结 7 899
旧时难觅i
旧时难觅i 2020-11-22 02:19

My compiler (GCC) is giving me the warning:

warning: implicit declaration of function

Please help me understand why is it coming

7条回答
  •  旧时难觅i
    2020-11-22 03:00

    You need to declare the desired function before your main function:

    #include 
    int yourfunc(void);
    
    int main(void) {
    
       yourfunc();
     }
    

提交回复
热议问题