Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以sleep在c不包含的情况下使用<unistd.h>,但gcc会报告:
sleep
c
<unistd.h>
gcc
警告:函数“睡眠”的隐式声明 [-Wimplicit-function-declaration]
但它仍然有效。例如,我可以调用sleep(8)并使用该time()函数计算时间,我可以看到 8 秒已过。
sleep(8)
time()
为什么会报告此警告?