Linux header question

This is a discussion on Linux header question within the Linux Programming forums, part of the Platform Specific Boards category; Is this the most important linux headers? sys/socket.h= defines funetion prototype. sys/types.h=standard system types. resolv.h=defines needed data types Am i ...

  1. #1
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28

    Linux header question

    Is this the most important linux headers?

    sys/socket.h= defines funetion prototype.

    sys/types.h=standard system types.

    resolv.h=defines needed data types


    Am i miss anything?

  2. #2
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    Quote Originally Posted by invisibleghost
    most important linux headers
    What do you consider important?
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    channel: #c

  3. #3
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28
    Any headers that are main use in linux programs.I a newbie try to learn to progem in linux.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Stop worrying about the relative importance of headers, and follow a good tutorial. There are some on this site, I suggest you start there.

  5. #5
    Registered User invisibleghost's Avatar
    Join Date
    Jun 2004
    Posts
    28
    Who said i worrying,I been use linux for years.Could you come up with something better then that?If your not going to help someone with a question don't reply is that so hard to do.?

  6. #6
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,169
    There's no such thing as "important headers." There's only "headers you need to perform a certain task." For example, you don't need resolv.h unless you're going to be using DNS in your program. Most programs include stdio.h, but if you're not going to be doing any standard I/O you don't need that either.

    Every header file is important when it contains what you need. And what you need depends on your program. If you're doing SDL programming then I'd say the SDL header files are pretty important. If you're going to be using the standard string functions then I'd say string.h is pretty important. If you're going to be doing dynamic memory allocation then I'd say stdlib.h is pretty important.

    Like bithub said, stop worrying about which header files are important. Just include the ones you need to. The top of each function's manpage tells you what header file(s) contains what you need to use that function.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. General a.out redirection question under Linux
    By merixa in forum C++ Programming
    Replies: 3
    Last Post: 11-07-2005, 04:36 PM
  2. C header file question?
    By correlcj in forum C Programming
    Replies: 3
    Last Post: 08-13-2002, 07:59 AM
  3. global variable and header question
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 08-05-2002, 11:38 PM
  4. header file question
    By unanimous in forum C Programming
    Replies: 1
    Last Post: 12-15-2001, 07:15 PM
  5. Question about LINUX
    By River21 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 09-17-2001, 06:39 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21