forbids declaration of `tcpBind' with no type
时间:2010-08-30 来源:orchisan
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;
}
函数前面要加类型。
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;
}
函数前面要加类型。
相关阅读 更多 +