For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > September 2004 > Re: Which header should I include if I use function close() and









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Which header should I include if I use function close() and
Måns Rullgård

2004-09-29, 8:07 pm

learning_c@hotmail.com (learning_C++) writes:

> Hi,
> Which header should I include if I use function close() and
> inet_ntoa()in C? Since now there is a warning:
>
> warning: implicit declaration of function `close'
> warning: implicit declaration of function `inet_ntoa'


$ man close
[...]
SYNOPSIS
#include <unistd.h>

int close(int fd);

$ man inet_ntoa
[...]
SYNOPSIS
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

--
Måns Rullgård
mru@mru.ath.cx
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com