LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2013, 11:04 AM   #1
NEHA V
LQ Newbie
 
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
header files


why is #include<sys/types.h> required?
 
Old 08-12-2013, 11:05 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Because, the program you are creating requires the 'types' headers?

What program are you talking about? What are you trying to accomplish.

What do you really want to know?
 
Old 08-12-2013, 04:06 PM   #3
Drumachine
Member
 
Registered: Aug 2013
Distribution: Debian/LFS
Posts: 32
Blog Entries: 3

Rep: Reputation: 5
header files

1. That line is at the start of the program, and is used by the preprocessor
2. 'include' means to take the following header file (.h file) and insert its contents before your main code before compiling.
3. The header file contains code which sets up one or more functions. If a tutorial is asking you to write that line, it will be using a function later on that is prepared in the header file just mentioned.

-D
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux header files missing and v4l files unable to compile szutshi Linux - Newbie 5 09-13-2011 02:00 PM
using header files: how do you ref and put fumulas in headers files cuthbertmd1 Programming 7 02-15-2011 06:25 AM
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 03:57 AM
Including header files and source files for classes Feenix Programming 8 09-28-2005 10:53 AM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration