Thread: C header files

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    4

    Question C header files

    Hi everybody!
    Sorry to trouble you again... but can anybody tell me if in the condition #include<sys/time.h> the header file "sys/time.h" is a standard C library file?

    Thank you
    Luís Dimas

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    #include <time.h>
    is standard
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    4
    Originally posted by Hammer
    #include <time.h>
    is standard
    So, can you tell me what does <sys/time.h> refers to... or what does "/" means in an header file...
    Thanks
    Luís Dimas

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    The slash means look in subdirectory called sys for file called time.h.

    I think that's a Unix version of the header file, probably holding some OS specific functions. If you have it, open it and see what functions are defined in there.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    May 2002
    Posts
    4
    >Hammer wrote:

    >The slash means look in subdirectory called sys for file called >time.h.
    >
    >I think that's a Unix version of the header file, probably holding >some OS specific functions. If you have it, open it and see what >functions are defined in there.

    I don´t have acess to that subdirectoey... i'm trying to run "this" piece of code from a windows machine. I think you are right about the slash meaning in the header file... it must be a Unix version.

    Thank you for your kind help
    Luis

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. #include header files or .cpp files?
    By DoctorX in forum C++ Programming
    Replies: 3
    Last Post: 12-23-2006, 12:21 PM
  3. classes and header files
    By Drake in forum C++ Programming
    Replies: 8
    Last Post: 11-30-2006, 07:12 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM