Solved

warning message in C

Posted on 2008-10-17
2
281 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

828 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