Thread: user defined header files

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    1

    user defined header files

    How does one create his own (having any name)header file,
    which uses any user defined functions??

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    You just create a new file called something .h (technically, there is no strict requirement to call the file .h either - but it helps others understand what the file contains). How you create a new file depends on the tools you use to edit files - without knowing if you are using for example Visual Studio on Windows, or Emacs on Linux, to give two completely different examples, none of us can tell you what steps you need to follow to create a new file.

    Once you have an empty file, you need to put into it whatever you feel it should contain. There are no strict rules, but generally you only put declarations on header files, and implementations/definitions in the .c/.cpp files.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Header Files
    By devarishi in forum C Programming
    Replies: 8
    Last Post: 12-10-2008, 04:53 PM
  2. SSH Hacker Activity!! AAHHH!!
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 03-06-2005, 03:53 PM
  3. DLL compiling question
    By Noose in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2004, 07:16 AM
  4. user created header files
    By MedicKth in forum C++ Programming
    Replies: 6
    Last Post: 09-20-2003, 12:36 PM
  5. Header files
    By borland_man in forum C++ Programming
    Replies: 14
    Last Post: 02-22-2002, 04:30 AM