warning: implicitly declaring library function 'printf' with type'int (const char *, ...)'
警告一般发生在没有包含头文件 #include "stdio.h" 就使用 printf 的情况。编译器在编译的过程中发现源文件中没有声明 printf 函数就直接使用,编译器就会为 printf 函数隐式生成一个声明。编译器提示你,它为printf生成的隐式声明是:int printf(const char *, ...)。
只需在开头添加#include "stdio.h""即可解决。