我得到函数strncmp的隐式声明

jin*_*ngo 14 c

当使用strncmp(xcode 4/gcc version 4.2.1)时,我得到"隐含的函数声明'strncmp'在C99中无效"如何避免这种情况?

Ign*_*ams 33

strncmp(3)手册页:

      #include <string.h>
Run Code Online (Sandbox Code Playgroud)


Meh*_*dad 8

你忘记了#include <string.h>吗?