其实在很多程序中都会出现类似的情况,因此为了方便,我们在编写程序时都把常用的头文件加上,或者将常用的头文件和函数编写到一个自定义的头文件中。

警告:隐式声明与内建函数 ‘memset’ 不兼容   ---------->man memset

MEMSET(3)                  Linux Programmer’s Manual                 MEMSET(3)

NAME
       memset - fill memory with a constant byte

SYNOPSIS
       #include <string.h>

       void *memset(void *s, int c, size_t n);

DESCRIPTION
       The  memset()  function  fills the first n bytes of the memory
       area pointed to by s with the constant byte c.

RETURN VALUE
       The memset() function returns a pointer to the memory area  s.

CONFORMING TO
       SVr4, 4.3BSD, C89, C99, POSIX.1-2001.

SEE ALSO
       bzero(3), swab(3), wmemset(3)
:

我们可以看到里面的头文件#include<string.h>,把他加进去就ok了。


GitHub 加速计划 / li / linux-dash
13
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐