While working on an socket-based application, we received the following warnings from the compiler:
当在基于 socket 的应用工作时,我们接收到下面编译器发出的警告
implicit declaration of function 'read'
implicit declaration of function 'write'
read
和 write
是 声明在 unistd.h
头文件的函数,这是我们忘记了添加 #include <unistd.h>
的原因
#include <unistd.h>