Solved

warning message in C

Posted on 2008-10-17
2
280 Views
Last Modified: 2012-05-05
Hello group,

GCC complains (warning) on following line with this message:   test.c:81: warning: implicit declaration of function 'close'

     main()

    {

        ..... some code

        close(sock);  //closing a socket

        return 0;
      }


what is wrong here?

Thanks.

0
Comment
Question by:akohan
2 Comments
 
LVL 23

Accepted Solution

by:
Kamaraj Subramanian earned 125 total points
ID: 22746226
you need these files

unistd.h
stdlib.h
arpa/inet.h
0
 

Author Comment

by:akohan
ID: 22746381


Thanks!

Right, I was missing unistd.h so now it is included.

Regards,
ak
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Retrun object in plist format 5 63
How to set environment variables in C 2 84
First character of input string truncated with scanf 3 99
Line meaning 9 86
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question