其他分享
首页 > 其他分享> > implicit declaration of function ‘sleep’

implicit declaration of function ‘sleep’

作者:互联网

需要加入函数的申明

<built-in>: note: built-in ‘strncmp’ declared here
shmread.c:101:9: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
  101 |         sleep(1);
      |         ^~~~~
shmread.c:99:12: warning: implicit declaration of function ‘strncmp’ [-Wimplicit-function-declaration]
   99 |         if(strncmp(shared->text,"end",3)==0)
      |            ^~~~~~~
int strncmp ( const char * str1, const char * str2, size_t n );
unsigned int sleep (unsigned int seconds)

标签:function,strncmp,int,sleep,declaration,implicit
来源: https://blog.csdn.net/hfut31415926/article/details/111661359