Thread: home made header files...

  1. #1
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279

    home made header files...

    i am currently using Borland's C++ Builder 5 .... the only downfall of it is that i am using it for dos (console) programming .... in the old days i was just using the DGJPP comiler which was relatively simple....my question is: if i write my own header file (header.h) and my own implementation file (header.cpp) how do i go about compiling and linking them (using Borland), so that the compiler knows that path to each component file????

    thanx for any insights....

    matheo917

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    194
    I use VC++6.0 so this may or may not apply, but when i make a .h and .cpp file I usually include the .h file into the project, and have a #include statement in the main.cpp file to include the .h file
    The .h file then #include's the .cpp implimentation file.

    You could place the 2 files in your compilers include directory, or in the same directory that the main source code is in, and add the .h to the project, if necessary

  3. #3
    Registered User matheo917's Avatar
    Join Date
    Sep 2001
    Posts
    279
    i played around with it and i actually got it to work....
    your insights were helpful....

    thanx

    matheo917

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Header files in .h
    By swgh in forum C++ Programming
    Replies: 5
    Last Post: 05-29-2008, 08:58 AM
  2. Help using Header Files
    By d34n in forum C Programming
    Replies: 8
    Last Post: 04-21-2008, 11:06 PM
  3. need help with menu program and header files
    By DFC in forum C++ Programming
    Replies: 12
    Last Post: 12-07-2005, 12:09 PM
  4. Missing header files and libraries with Borland
    By quagsire in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2003, 06:19 AM
  5. Header files
    By Jez_Master in forum C++ Programming
    Replies: 2
    Last Post: 04-08-2002, 07:56 AM