Header organization question

This is a discussion on Header organization question within the C Programming forums, part of the General Programming Boards category; I've recently been included in a midsized C project with many .c and .h files. The problem that I'm having ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    1

    Question Header organization question

    I've recently been included in a midsized C project with many .c and .h files. The problem that I'm having is organizing the #include statements so that there are no circular dependencies, which are causing problems with our compiler. The project has used the #ifndef statements, but we are still getting errors.

    I was wondering if anyone knows a good standard for organizing .h files and #include's so that all the dependencies are easy to follow. Thanks in advance!

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    Instead of reorganizing the #include statements, you could consider to reorganise the contents of the header-files. If you have error with the header-files, it is often easier to reorganise the contents of the header-files than finding out how to organise the #include statements.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Header File question
    By vishalag in forum C Programming
    Replies: 1
    Last Post: 06-17-2009, 07:25 AM
  2. Header files question
    By Programmer_P in forum C++ Programming
    Replies: 8
    Last Post: 05-14-2009, 01:16 PM
  3. Linux header question
    By invisibleghost in forum Linux Programming
    Replies: 5
    Last Post: 02-17-2005, 09:03 AM
  4. Replies: 6
    Last Post: 04-02-2002, 04:46 AM
  5. header file question
    By unanimous in forum C Programming
    Replies: 1
    Last Post: 12-15-2001, 07:15 PM

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