Does #include "..." mean it's a user defined header file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Leo Sung Jun

    Does #include "..." mean it's a user defined header file?

    I am a novice programmer. I got half implemented C++ coding from customer site. I need to proceed implementing that coding.
    At that code, there is #include "logger.h"
    header file.
    My question is that "logger.h" is system defined header file? I mean ""logger.h" is supported by library such as <windows.h> or <iostream.h>? "
    Or the developer must write "logger.h" by themselves?
    According to my idea, " " means user defined header file. Am I right?
    Thanks in advanced.
  • Meetee
    Recognized Expert Contributor
    • Dec 2006
    • 928

    #2
    Check this and this

    Comment

    • newb16
      Contributor
      • Jul 2008
      • 687

      #3
      I mean "logger.h" is supported by library such as <windows.h> or <iostream.h>? "

      iostream and windows.h are not libraries, they are header files. logger.h is not a part of standard C++ library. It's either part of a project itself or some third-party components. Comment it and see what is missing.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        #include "..." as opposed to #include <...> does not mean user defined.

        It tells the compiler to check the directory of the current file for the included file first before checking for files in the standard include path.

        On the other hand using <> tells the compiler to ignore the directory of the current file and just check in the standard include path.

        It is normal (but not required) to use "" for headers that are part of the program source and <> for headers that are part of the system.

        Comment

        • donbock
          Recognized Expert Top Contributor
          • Mar 2008
          • 2427

          #5
          I don't think the C Standard requires a compiler to treat the two forms of #include differently; so you can't count on it to mean anything.

          Comment

          Working...