home made header files...

This is a discussion on home made header files... within the C++ Programming forums, part of the General Programming Boards category; i am currently using Borland's C++ Builder 5 .... the only downfall of it is that i am using it ...

  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, 09:58 AM
  2. Help using Header Files
    By d34n in forum C Programming
    Replies: 8
    Last Post: 04-22-2008, 12:06 AM
  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, 08:56 AM

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