LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 680|回复: 2

why?help me !!!!!!1

[复制链接]
发表于 2003-2-18 14:49:30 | 显示全部楼层 |阅读模式
/***************************************************************************
                          main.c  -  description
                             -------------------
    begin                : Mon Feb 17 11:34:00 CST 2003
    copyright            : (C) 2003 by lzh08
    email                : lzh08@sohu.com
***************************************************************************/



#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/wait.h>

#define MYPORT  1490
#define BACKLOG 10   


int main()
{
  printf("Hello, world!\n");
  unsigned char flag;
  struct sockaddr_in serveraddr;

  if (inet_aton("192.168.0.1",&(serveraddr.sin_addr)) == 1)
      flag = 1;
  else
      flag = 2;

  printf("%d",&(serveraddr.sin_addr.s_addr));
  
  return EXIT_SUCCESS;
}

main.c:41: warning: implicit declaration of function `inet_aton'

main.c:46: warning: int format, pointer arg (arg 2)

what it means?help me !
发表于 2003-2-18 15:17:03 | 显示全部楼层
我在我的RH72下面编译了你的程序,只要把你的printf("Hello, world!\n"); 拿走,编译的时候就没有任何warning。
gcc main.c

你改了你的代码?你怎么编译的?
 楼主| 发表于 2003-2-18 15:31:22 | 显示全部楼层

wrong?

I use kdevelop version 2.1IDE,and redhat8.0,after deleting printf(),the same as problem.
why?please help me!!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表