当前位置: 技术问答>linux和unix
请教:怎么去掉这个警告,谢谢!
来源: 互联网 发布时间:2015-12-17
本文导语: #include #include #include #include #include #include #define MAXLINE 1024 typedef struct sockaddr SA; int main(int argc, char **argv) { int sockfd, n; char recvline[MAXLINE + 1];...
#include
#include
#include
#include
#include
#include
#define MAXLINE 1024
typedef struct sockaddr SA;
int main(int argc, char **argv)
{
int sockfd, n;
char recvline[MAXLINE + 1];
struct sockaddr_in servaddr;
if (argc != 2)
{
printf("usage: a.out ");
exit (1);
}
if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0))
#include
#include
#include
#include
#include
#define MAXLINE 1024
typedef struct sockaddr SA;
int main(int argc, char **argv)
{
int sockfd, n;
char recvline[MAXLINE + 1];
struct sockaddr_in servaddr;
if (argc != 2)
{
printf("usage: a.out ");
exit (1);
}
if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0))