ANSI C++ forbids declaration of `tcpBind' with no type
CTcpTrans::tcpBind(int sockfd, struct sockaddr *my_addr, int addrlen)
{
int ret;
ret = bind(sockfd, my_addr, addrlen);
return ret;
}
改为
int CTcpTrans::tcpBind(int sockfd, struct sockaddr *my_addr, int addrlen)
{
int ret;
ret = bind(sockfd, my_addr, addrlen);
return ret;
}
函数前面要加类型。
阅读(1366) | 评论(0) | 转发(0) |