Solved

warning message in C

Posted on 2008-10-17
2
282 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

737 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