1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

difference between header file and library file

Discussion in 'C' started by bothra_jain, Dec 24, 2005.

  1. bothra_jain

    bothra_jain New Member

    Joined:
    Dec 16, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    May anyone tell me about the difference between header file and library file in c/c++
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    You have posted in the wrong forum and I have moved the thread to the correct forum.

    Normally in header file the function / Class definitions exist and in lib files the implementation of the functions reside.
     
  3. bothra_jain

    bothra_jain New Member

    Joined:
    Dec 16, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Thanks 4 help. may u tell me in depth about it?
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    Depth about it can be explained with an example.

    Lets we define a Class A in file a.h and its function definition lies in a.cpp

    Then when you compile and create the library the definition of function lies in the .h files and the implementation lies in the lib files.

    Like say iostream.h files hold the function signatures of the function and the corresponding lib files has the actual implementation of the function.
     
    Last edited: Dec 25, 2005

Share This Page