[英]warning: implicit declaration of function ‘sendto’
I have following problem: 我有以下问题:
warning: implicit declaration of function ‘sendto’
on line in variable outputCounterByte
: 在变量outputCounterByte
:
outputCounterByte += sendto(server_socket, outputBuff, offSet, 0, (struct sockaddr*) remote_addr, server_addr_len);
I don't understand this, where is a problem? 我不明白,哪里有问题? OutputCouterByte is on value 0, and other variables are defined. OutputCouterByte的值为0,并且定义了其他变量。 I have included all headers(prototype of function). 我已包含所有标头(函数原型)。 In other functions it is working. 在其他功能中,它正在工作。
You need to include 您需要包括
#include <sys/types.h>
#include <sys/socket.h>
to provide the function prototype. 提供功能原型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.