header files

Discussion in 'Unix' started by buddy, Aug 31, 2007.

  1. buddy

    buddy New Member

    Joined:
    Aug 31, 2007
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    how a header file is included in the file(Path .Where exactly the definitions of the functions and variables declared in a header file will be ???? in unix.Plz clarify this one too,till now i didnt got answer.!! :confused:
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    What programming language you are talking it for. It looks like a C-C++ issue.
     
  3. buddy

    buddy New Member

    Joined:
    Aug 31, 2007
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0

    Yes, I want to know how the header files are linked (In C,C++),where will be the definations of the declarations in the header files will be??..how to explain this in the interview.Thanks in advance.
     
  4. buddy

    buddy New Member

    Joined:
    Aug 31, 2007
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    hi shabbir,

    I want to know for C,C++ programming language, how the header files are inked where will be its definitions be defined??? how to explain it in interviews.
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Header files help the compiler to know that the function exists and the lib files help them find out where on the program is the function located. The linking happens after the compiler and so if you do not have the lib files you will get the linker errors.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice