Solved

warning message in C

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now